2022-09-17 05:48:41

by Akinobu Mita

[permalink] [raw]
Subject: Re: [PATCH -next v2 1/5] docs: notifier-error-inject: fix non-working usage of negative values

2022年9月15日(木) 18:01 Zhao Gongyi <[email protected]>:
>
> 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.


2022-09-19 09:35:18

by David Hildenbrand

[permalink] [raw]
Subject: Re: [PATCH -next v2 1/5] docs: notifier-error-inject: fix non-working usage of negative values

On 17.09.22 07:39, Akinobu Mita wrote:
> 2022年9月15日(木) 18:01 Zhao Gongyi <[email protected]>:
>>
>> 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?

--
Thanks,

David / dhildenb