kcsbridge cannot work with the latest sdbusplus package.

Patrick Williams patrick at stwcx.xyz
Sat Jun 6 01:33:21 AEST 2020


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/7f664254a4365612b82db2fd8fb82798686e777b/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-names

-- 
Patrick Williams
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20200605/62a6805e/attachment-0001.sig>


More information about the openbmc mailing list