lkml.org 
[lkml]   [2022]   [Sep]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH -next v2 1/5] docs: notifier-error-inject: fix non-working usage of negative values
From
On 19.09.22 11:01, zhaogongyi wrote:
> Hi!
>
>>
>> On 17.09.22 07:39, Akinobu Mita wrote:
>>> 2022年9月15日(木) 18:01 Zhao Gongyi <zhaogongyi@huawei.com>:
>>>>
>>>> Fault injection uses debugfs in a way that the provided values via
>>>> sysfs are interpreted as u64. Providing negative numbers results in
>>>> an error:
>>>>
>>>> # cd sys/kernel/debug/notifier-error-inject/memory
>>>> # echo -12 > actions/MEM_GOING_ONLINE/error
>>>> -bash: echo: write error: Invalid argument
>>>>
>>>> Update the docs and examples to use "printf %#x <val>" in these cases.
>>>
>>> I'd rather fix the notifier-error-inject module than change the user
>> interface.
>>> I'll send a patch, so could you check if that solves the problem.
>>>
>>
>> That will also make patch #2 unnecessary, correct?
>
> Yes. But there is another commit 005747526d4f3c2ec995891e95cb7625161022f9 that has the same problem.
>
> Thanks!

Right. See my reply to the other patch:

https://lkml.kernel.org/r/93c044ca-7d2f-e23f-8eb4-72c133737a15@redhat.com

simple_attr_read()/simple_attr_write() fmt behavior is odd.

--
Thanks,

David / dhildenb

\
 
 \ /
  Last update: 2022-09-19 13:06    [W:0.029 / U:0.268 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site