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:   Tue, 2 Oct 2018 22:56:06 -0700
From:   John Johansen <john.johansen@...onical.com>
To:     Lance Roy <ldr709@...il.com>, linux-kernel@...r.kernel.org
Cc:     "Paul E. McKenney" <paulmck@...ux.ibm.com>,
        James Morris <jmorris@...ei.org>,
        "Serge E. Hallyn" <serge@...lyn.com>,
        linux-security-module@...r.kernel.org
Subject: Re: [PATCH 15/16] apparmor: Replace spin_is_locked() with lockdep

On 10/02/2018 10:39 PM, Lance Roy wrote:
> lockdep_assert_held() is better suited to checking locking requirements,
> since it won't get confused when someone else holds the lock. This is
> also a step towards possibly removing spin_is_locked().
> 
> Signed-off-by: Lance Roy <ldr709@...il.com>
> Cc: John Johansen <john.johansen@...onical.com>
> Cc: James Morris <jmorris@...ei.org>
> Cc: "Serge E. Hallyn" <serge@...lyn.com>
> Cc: <linux-security-module@...r.kernel.org>

Acked-by: John Johansen <john.johansen@...onical.com>

> ---
>  security/apparmor/file.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/security/apparmor/file.c b/security/apparmor/file.c
> index 4285943f7260..d0afed9ebd0e 100644
> --- a/security/apparmor/file.c
> +++ b/security/apparmor/file.c
> @@ -496,7 +496,7 @@ static void update_file_ctx(struct aa_file_ctx *fctx, struct aa_label *label,
>  	/* update caching of label on file_ctx */
>  	spin_lock(&fctx->lock);
>  	old = rcu_dereference_protected(fctx->label,
> -					spin_is_locked(&fctx->lock));
> +					lockdep_is_held(&fctx->lock));
>  	l = aa_label_merge(old, label, GFP_ATOMIC);
>  	if (l) {
>  		if (l != old) {
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ