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]
Message-ID: <86b3a4f4-18fd-40c6-9f96-825af52a0509@kernel.org>
Date: Thu, 9 Oct 2025 21:39:07 +0900
From: Vincent Mailhol <mailhol@...nel.org>
To: Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
 linux-kernel@...r.kernel.org
Cc: Peter Zijlstra <peterz@...radead.org>, Ingo Molnar <mingo@...hat.com>,
 Will Deacon <will@...nel.org>, Waiman Long <longman@...hat.com>,
 Vlastimil Babka <vbabka@...e.cz>
Subject: Re: [PATCH v3] locking/local_lock: s/l/__l/ and s/tl/__tl/ to reduce
 risk of shadowing

Hi Sebastian,

Thanks for the rebase and for this v3.

On 09/10/2025 at 19:39, Sebastian Andrzej Siewior wrote:

(...)

> @@ -223,12 +223,12 @@ typedef spinlock_t local_trylock_t;
>  #define INIT_LOCAL_LOCK(lockname) __LOCAL_SPIN_LOCK_UNLOCKED((lockname))
>  #define INIT_LOCAL_TRYLOCK(lockname) __LOCAL_SPIN_LOCK_UNLOCKED((lockname))
>  
> -#define __local_lock_init(l)					\
> +#define __local_lock_init(__l)					\
>  	do {							\
> -		local_spin_lock_init((l));			\
> +		local_spin_lock_init((__l));			\
>  	} while (0)
>  
> -#define __local_trylock_init(l)			__local_lock_init(l)
> +#define __local_trylock_init(__l)			__local_lock_init(__l)
>  
>  #define __local_lock(__lock)					\
>  	do {							\

The parameters of a function like macro can not shadow existing
symbols because, when invoked, these parameters would be substituted
during the macro expansion by the actual arguments. Only the local
variables declared in the macro would survive after the preprocessor
and thus only those may cause shadowing.

So this last part of the patch is not needed.


Yours sincerely,
Vincent Mailhol

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ