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] [day] [month] [year] [list]
Message-ID: <e6492627-7ef8-416b-af74-b7026de93b43@amd.com>
Date: Wed, 13 Nov 2024 08:50:27 +0530
From: Neeraj Upadhyay <Neeraj.Upadhyay@....com>
To: paulmck@...nel.org
Cc: rcu@...r.kernel.org, linux-kernel@...r.kernel.org, kernel-team@...a.com,
 rostedt@...dmis.org, Alexei Starovoitov <ast@...nel.org>,
 Andrii Nakryiko <andrii@...nel.org>, Peter Zijlstra <peterz@...radead.org>,
 Kent Overstreet <kent.overstreet@...ux.dev>, bpf@...r.kernel.org
Subject: Re: [PATCH rcu 11/15] rcutorture: Add reader_flavor parameter for
 SRCU readers


>>>  
>>>  static int srcu_torture_read_lock(void)
>>>  {
>>> -	if (cur_ops == &srcud_ops)
>>> -		return srcu_read_lock_nmisafe(srcu_ctlp);
>>> -	else
>>> -		return srcu_read_lock(srcu_ctlp);
>>> +	int idx;
>>> +	int ret = 0;
>>> +
>>> +	if ((reader_flavor & 0x1) || !(reader_flavor & 0x7)) {
>>
>> Minor: Maybe use macros in place of 0x1, 0x2, 0x7 as a cleanup later.
> 
> Hmmm...
> 
> I could move SRCU_READ_FLAVOR_* to include/linux/srcu.h and make
> rcutorture use those.  Plus have a combined mask for the instances of 0x7.
> 
> Or is there a better way?
> 

Yes, I was thinking the same. This looks good.


- Neeraj

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ