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:   Fri, 24 May 2019 08:41:27 +0200
From:   Ingo Molnar <mingo@...nel.org>
To:     Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Cc:     linux-kernel@...r.kernel.org,
        Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>,
        Will Deacon <will.deacon@....com>, tglx@...utronix.de
Subject: Re: [PATCH] locking/lockdep: Don't complain about wrong name for no
 validate class


* Sebastian Andrzej Siewior <bigeasy@...utronix.de> wrote:

> It is possible to ignore the validation for a certain log be using
> 	lockdep_set_novalidate_class()

s/log/lock
s/be/by

?

> on it. Each invocation will assign a new name to the class it created
> for created __lockdep_no_validate__. That means that once
> lockdep_set_novalidate_class() has been used on two locks then
> class->name won't match lock->name for the first lock triggering the
> warning.
> 
> Ignoring changed non-matching ->name pointer for the
> __lockdep_no_validate__ class.
> 
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
> ---
>  kernel/locking/lockdep.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c
> index d06190fa50822..38be69d344f7f 100644
> --- a/kernel/locking/lockdep.c
> +++ b/kernel/locking/lockdep.c
> @@ -731,7 +731,8 @@ look_up_lock_class(const struct lockdep_map *lock, unsigned int subclass)
>  			 * Huh! same key, different name? Did someone trample
>  			 * on some memory? We're most confused.
>  			 */
> -			WARN_ON_ONCE(class->name != lock->name);
> +			WARN_ON_ONCE(class->name != lock->name &&
> +				     lock->key != &__lockdep_no_validate__);

Looks good otherwise - applied.

Thanks,

	Ingo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ