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: <CAHC9VhSzqccDgt2EAPqVmTFCcETrKrkUDRoL-2YzzSFGfYJGQg@mail.gmail.com>
Date:   Tue, 18 Feb 2020 17:48:56 -0500
From:   Paul Moore <paul@...l-moore.com>
To:     madhuparnabhowmik10@...il.com
Cc:     davem@...emloft.net, netdev@...r.kernel.org,
        linux-security-module@...r.kernel.org,
        linux-kernel@...r.kernel.org, joel@...lfernandes.org,
        frextrite@...il.com,
        linux-kernel-mentees@...ts.linuxfoundation.org, paulmck@...nel.org
Subject: Re: [PATCH] net: netlabel: Use built-in RCU list checking

On Tue, Feb 18, 2020 at 1:17 PM <madhuparnabhowmik10@...il.com> wrote:
>
> From: Madhuparna Bhowmik <madhuparnabhowmik10@...il.com>
>
> list_for_each_entry_rcu() has built-in RCU and lock checking.
>
> Pass cond argument to list_for_each_entry_rcu() to silence
> false lockdep warning when CONFIG_PROVE_RCU_LIST is enabled
> by default.
>
> Signed-off-by: Madhuparna Bhowmik <madhuparnabhowmik10@...il.com>
> ---
>  net/netlabel/netlabel_unlabeled.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

Not that this has much bearing since it's already been merged, but for
what it's worth ...

Acked-by: Paul Moore <paul@...l-moore.com>

> diff --git a/net/netlabel/netlabel_unlabeled.c b/net/netlabel/netlabel_unlabeled.c
> index d2e4ab8d1cb1..77bb1bb22c3b 100644
> --- a/net/netlabel/netlabel_unlabeled.c
> +++ b/net/netlabel/netlabel_unlabeled.c
> @@ -207,7 +207,8 @@ static struct netlbl_unlhsh_iface *netlbl_unlhsh_search_iface(int ifindex)
>
>         bkt = netlbl_unlhsh_hash(ifindex);
>         bkt_list = &netlbl_unlhsh_rcu_deref(netlbl_unlhsh)->tbl[bkt];
> -       list_for_each_entry_rcu(iter, bkt_list, list)
> +       list_for_each_entry_rcu(iter, bkt_list, list,
> +                               lockdep_is_held(&netlbl_unlhsh_lock))
>                 if (iter->valid && iter->ifindex == ifindex)
>                         return iter;
>
> --
> 2.17.1

-- 
paul moore
www.paul-moore.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ