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: <cea9c68e-758a-44ce-8afc-448294456317@intel.com>
Date: Wed, 23 Oct 2024 16:44:10 +0200
From: Przemek Kitszel <przemyslaw.kitszel@...el.com>
To: Peter Zijlstra <peterz@...radead.org>
CC: <linux-kernel@...r.kernel.org>, <llvm@...ts.linux.dev>,
	<oe-kbuild-all@...ts.linux.dev>, <amadeuszx.slawinski@...ux.intel.com>, "Tony
 Nguyen" <anthony.l.nguyen@...el.com>,
	<nex.sw.ncis.osdt.itp.upstreaming@...el.com>, <netdev@...r.kernel.org>,
	Markus Elfring <Markus.Elfring@....de>, Kees Cook <keescook@...omium.org>,
	David Lechner <dlechner@...libre.com>, Dan Carpenter <error27@...il.com>,
	Andy Shevchenko <andriy.shevchenko@...el.com>, Dmitry Torokhov
	<dmitry.torokhov@...il.com>, kernel test robot <lkp@...el.com>
Subject: Re: [PATCH v3] cleanup: adjust scoped_guard() macros to avoid
 potential warning

On 10/23/24 16:32, Peter Zijlstra wrote:
> On Wed, Oct 23, 2024 at 03:43:22PM +0200, Przemek Kitszel wrote:
>> On 10/18/24 12:50, Peter Zijlstra wrote:
>>> On Sun, Oct 13, 2024 at 12:01:24PM +0800, kernel test robot wrote:
> 
>>> --- a/include/linux/cleanup.h
>>> +++ b/include/linux/cleanup.h
>>> @@ -323,7 +323,7 @@ static __maybe_unused const bool class_#
>>>     */
>>>    #define __scoped_guard(_name, _fail, _label, args...)				\
>>>    	for (CLASS(_name, scope)(args);	true; ({ goto _label; }))		\
>>> -		if (!__guard_ptr(_name)(&scope) && __is_cond_ptr(_name)) {	\
>>> +		if (__is_cond_ptr(_name) && !__guard_ptr(_name)(&scope)) {	\
>>
>> but this will purge the attempt to call __guard_ptr(), and thus newer
>> lock ;) good that there is at least some comment above
> 
> No, __guard_ptr() will only return a pointer, it has no action. The lock
> callback is in CLASS(_name, scope)(args).

Ach, true! Thanks again for taking a look at my series!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ