lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 04 Jun 2024 10:52:49 -0700
From: Ankur Arora <ankur.a.arora@...cle.com>
To: Shrikanth Hegde <sshegde@...ux.ibm.com>
Cc: Ankur Arora <ankur.a.arora@...cle.com>, tglx@...utronix.de,
        peterz@...radead.org, torvalds@...ux-foundation.org,
        paulmck@...nel.org, rostedt@...dmis.org, mark.rutland@....com,
        juri.lelli@...hat.com, joel@...lfernandes.org, raghavendra.kt@....com,
        boris.ostrovsky@...cle.com, konrad.wilk@...cle.com,
        Jonathan Corbet
 <corbet@....net>, LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 04/35] preempt: introduce CONFIG_PREEMPT_AUTO


Shrikanth Hegde <sshegde@...ux.ibm.com> writes:

> On 5/28/24 6:04 AM, Ankur Arora wrote:

[...]

>> diff --git a/include/linux/thread_info.h b/include/linux/thread_info.h
>> index 9ea0b28068f4..06e13e7acbe2 100644
>> --- a/include/linux/thread_info.h
>> +++ b/include/linux/thread_info.h
>> @@ -59,6 +59,18 @@ enum syscall_work_bit {
>>
>>  #include <asm/thread_info.h>
>>
>> +/*
>> + * Fall back to the default need-resched flag when an architecture does not
>> + * define TIF_NEED_RESCHED_LAZY.
>> + *
>> + * Note: with !PREEMPT_AUTO, code should not be setting TIF_NEED_RESCHED_LAZY
>> + * anywhere. Define this here because we will explicitly test for this bit.
>> + */
>
>
> Is this comment still valid?
> I see that flag has been set without any checks in arch file.

Thanks for pointing this out. There is a typo in this comment.
Should have said "with !HAVE_PREEMPT_AUTO" instead of "with
!PREEMPT_AUTO" above.

So, an architecture should define HAVE_PREMPT_AUTO only if it also
defines TIF_NEED_RESCHED_LAZY and whatever else necessary to support
PREEMPT_AUTO.


Ankur

>> +#ifndef TIF_NEED_RESCHED_LAZY
>> +#define TIF_NEED_RESCHED_LAZY TIF_NEED_RESCHED
>> +#define _TIF_NEED_RESCHED_LAZY _TIF_NEED_RESCHED
>> +#endif
>> +
>>  #ifdef __KERNEL__
>>
>>  #ifndef arch_set_restart_data


--
ankur

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ