kcsbridge cannot work with the latest sdbusplus package.

Fran Hsu (徐誌謙) Fran.Hsu at quantatw.com
Sat Jun 6 17:07:52 AEST 2020


Hi Patrick,
	Thanks for the explanation, I push a fix to Gerrit for reviewing.

Thanks 
Fran Hsu
E-Mail : Fran.Hsu at QuantaTW.com

> -----Original Message-----
> From: Patrick Williams <patrick at stwcx.xyz>
> Sent: Friday, June 5, 2020 11:33 PM
> To: Fran Hsu (徐誌謙) <Fran.Hsu at quantatw.com>
> Cc: openbmc at lists.ozlabs.org; Vernon Mauery
> <vernon.mauery at linux.intel.com>
> Subject: Re: kcsbridge cannot work with the latest sdbusplus package.
> 
> On Fri, Jun 05, 2020 at 12:57:35PM +0000, Fran Hsu (徐誌謙) wrote:
> > Hi All,
> > 	I built the BMC FW from the latest OpenBMC branch. And I found the ksc
> channel is not working.
> > I got the following error message:
> > 	kcsbridged -c ipmi-kcs1
> > 	terminate called after throwing an instance of
> 'sdbusplus::exception::SdBusError'
> >   	what():  Invalid path or interface:
> org.freedesktop.DBus.Error.InvalidArgs: Invalid argument
> > 	Aborted (core dumped)
> >  So I did a check of the recent package changes.
> > The latest sdbusplus add the "validate interface and path passed to DBus",
> but there is a problem when kcsbridge call the "add_interface" API, the part of
> the regex checking function.
> >
> https://github.com/openbmc/sdbusplus/blob/7f664254a4365612b82db2fd8fb8
> > 2798686e777b/include/sdbusplus/asio/object_server.hpp#L811
> > kcsbridge takes the one parameter of the /dev/ipmi-kcs*. But regex function
> didn't allow the character '-', so I got the exception message.
> > Does it need to add the regex checking to the "add_interface" API? Or add
> the character '-' to the regex checking pattern?
> >
> > Thanks
> > Fran Hsu
> > E-Mail : Fran.Hsu at QuantaTW.com
> >
> 
> Hi Fran,
> 
> kcsbridged needs an update to not use a -.  This was added because:
> 
>     - The dbus spec is very clear about valid names for Interfaces,
>       Object Paths, and Services [1].
> 
>     - In some cases, sdbus itself and/or the dbus daemon actively check
>       for valid names and give an error, but in a few cases the error
>       was being ignored by applications.
> 
>     - For names that sdbus was not verifying, it is possible they add
>       verification in the future and cause code breakage.
> 
> I know I was helping one developer recently who was adding a new dbus
> element and they were stumped as to why their object was not showing up as
> they expected.  It was due to an invalid name that sdbus was dropping.
> Rather than a silent error from sdbus we made this a hard, obvious error, by
> throwing an exception.
> 
> Thanks for reporting the issue.  Are you interested in working up a fix,
> otherwise Vernon is the only listed maintainer presently?
> 
> [1]
> https://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-na
> mes
> 
> --
> Patrick Williams


More information about the openbmc mailing list