kcsbridge cannot work with the latest sdbusplus package.

Vernon Mauery vernon.mauery at linux.intel.com
Sat Jun 6 06:14:38 AEST 2020


On 05-Jun-2020 10:33 AM, Patrick Williams wrote:
>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?

Currently, we are dealing with this issue using a symlink to alias the 
kcs device.

root at intel-obmc:/tmp# cat /lib/udev/rules.d/99-ipmi-kcs.rules
KERNEL=="ipmi-kcs3", SYMLINK+="ipmi_kcs3"
KERNEL=="ipmi-kcs4", SYMLINK+="ipmi_kcs4"

Then we add the instance of the kcsbridge with the ipmi_kcs3 name. Keep 
in mind that whatever name you use, it should match the name in the 
/usr/share/ipmid-providers/channel_config.json file.

--Vernon



More information about the openbmc mailing list