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  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, 08 Sep 2020 20:12:40 -0700 (PDT)
From:   David Miller <davem@...emloft.net>
To:     kuba@...nel.org
Cc:     netdev@...r.kernel.org, paulmck@...nel.org, joel@...lfernandes.org,
        josh@...htriplett.org, peterz@...radead.org,
        christian.brauner@...ntu.com, rcu@...r.kernel.org,
        linux-kernel@...r.kernel.org, nikolay@...ulusnetworks.com,
        sfr@...b.auug.org.au, roopa@...dia.com
Subject: Re: [PATCH net-next] rcu: prevent RCU_LOCKDEP_WARN() from
 swallowing the condition

From: Jakub Kicinski <kuba@...nel.org>
Date: Tue,  8 Sep 2020 10:36:24 -0700

> We run into a unused variable warning in bridge code when
> variable is only used inside the condition of
> rcu_dereference_protected().
> 
>  #define mlock_dereference(X, br) \
> 	rcu_dereference_protected(X, lockdep_is_held(&br->multicast_lock))
> 
> Since on builds with CONFIG_PROVE_RCU=n rcu_dereference_protected()
> compiles to nothing the compiler doesn't see the variable use.
> 
> Prevent the warning by adding the condition as dead code.
> We need to un-hide the declaration of lockdep_tasklist_lock_is_held()
> and fix a bug the crept into a net/sched header.
> 
> Signed-off-by: Jakub Kicinski <kuba@...nel.org>

I ended up applying Nikolay's fix, but this situation with the rcu macros
needs to be addressed.

Powered by blists - more mailing lists