Re: [PATCH v5] kobject: Fix global-out-of-bounds in kobject_action_type()

From: Xia Fukun
Date: Wed May 17 2023 - 04:54:30 EST


在 2023/5/16 22:02, Peter Rajnoha wrote:
> On 5/16/23 14:37, Xia Fukun wrote:

>> ---
>> v4 -> v5:
>> - Fixed build errors and warnings, and retested the patch.
>>
>
> Please, also check this is still working:
> https://www.kernel.org/doc/Documentation/ABI/testing/sysfs-uevent
>
> When I try passing the example line "add
> fe4d7c9d-b8c6-4a70-9ef1-3d8a58d18eed A=1 B=abc", it doesn't recognize
> such input anymore and it incorrectly considers it as erroneous.
>

Why did I receive the following error message when passing the example
line "add fe4d7c9d-b8c6-4a70-9ef1-3d8a58d18eed A=1 B=abc" using the
original mainline code?

synth uevent: /devices/virtual/block/ram12: incorrect uevent action arguments
block ram12: uevent: failed to send synthetic uevent: -22

Is there a problem with my test case, or is the original code unable
to successfully parse the sample?