Re: [patch 03/12] rseq: Provide static branch for time slice extensions

Randy Dunlap
2025-09-09T16:01:22Z

On 9/9/25 5:12 AM, Thomas Gleixner wrote:
> On Mon, Sep 08 2025 at 21:11, Randy Dunlap wrote:
>> On 9/8/25 8:10 PM, K Prateek Nayak wrote:
>>> Hello Thomas,
>>>
>>> On 9/9/2025 4:29 AM, Thomas Gleixner wrote:
>>>> +#ifdef CONFIG_RSEQ_SLICE_EXTENSION
>>>> +DEFINE_STATIC_KEY_TRUE(rseq_slice_extension_key);
>>>> +
>>>> +static int __init rseq_slice_cmdline(char *str)
>>>> +{
>>>> + bool on;
>>>> +
>>>> + if (kstrtobool(str, &on))
>>>> + return -EINVAL;
>>>> +
>>>> + if (!on)
>>>> + static_branch_disable(&rseq_slice_extension_key);
>>>> + return 0;
>>>
>>> I believe this should return "1" signalling that the cmdline was handled
>>> correctly to avoid an "Unknown kernel command line parameters" message.
>>
>> Good catch. I agree.
>> Thanks.
>
> It seems I can't get that right ever ....

Yeah, it's bass-ackwards.

I guess that's partly why we have early_param() and friends.

--
~Randy