From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.3 required=3.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6AFE0C33CB1 for ; Wed, 15 Jan 2020 15:46:50 +0000 (UTC) Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 334682072B for ; Wed, 15 Jan 2020 15:46:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="AjsV29LT" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 334682072B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linux-kernel-mentees-bounces@lists.linuxfoundation.org Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id EEAB785B1D; Wed, 15 Jan 2020 15:46:49 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id YwIh2StZnNpD; Wed, 15 Jan 2020 15:46:45 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by hemlock.osuosl.org (Postfix) with ESMTP id 2C983857D6; Wed, 15 Jan 2020 15:46:45 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 1920EC1D83; Wed, 15 Jan 2020 15:46:45 +0000 (UTC) Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by lists.linuxfoundation.org (Postfix) with ESMTP id 90EFDC077D for ; Wed, 15 Jan 2020 15:46:43 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 8C5C3204CC for ; Wed, 15 Jan 2020 15:46:43 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9HwcyLseT6Dn for ; Wed, 15 Jan 2020 15:46:35 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-oi1-f195.google.com (mail-oi1-f195.google.com [209.85.167.195]) by silver.osuosl.org (Postfix) with ESMTPS id 8A2A320517 for ; Wed, 15 Jan 2020 15:46:33 +0000 (UTC) Received: by mail-oi1-f195.google.com with SMTP id 13so15755187oij.13 for ; Wed, 15 Jan 2020 07:46:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=8/BollNXFyqT/cepZYeE+wLWDM3dv1lO6PKhmKCFjP0=; b=AjsV29LTZILt+Wi6pF8lx8pQGcAjahEeD+b/nX3OlPUmbm9vpq3DxwuMAEoqab3oYn ZH/XJxFWed5LpRdLiMWm1Z7Yy5CdDcuD24HNKvDq9ATEkzDUuhSnLAh/WixOZ63hLss6 wzmW3OEKsmoaRmkJlodPsG96aokJxmN0G3xs24NlcZXTuTb72iyp4uznqkeIDk2zuxj5 XNa96XzGdulksUS2EW5wJrp6zqjSE9OuqCU21JFH+YoylZgOA+0XvdWotYm9bOy/Pz/7 Di410upJv7hYDpEFTwCOInlT4qbDWMCK/zYkV4d0wmEArNyS6SkT2ST0gedArukDAmB+ OyYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=8/BollNXFyqT/cepZYeE+wLWDM3dv1lO6PKhmKCFjP0=; b=Q864v30k4aOC2EsEHRJUzoKzjyvlIoYBYVdKc4djtqXrvqqDkY6zCwHfG7xmRzRfjM bDDh7crG9Cvlu6SkIvCQ4oNa+xNcrU7eTmc8cB/8fWG2AavoSqd10hEwUj4wB6IDO8Ya ZQ2rzYRax8Vyfj7e5bRd3+IHM0zQJDlt0ZoFzj/pJMWERLwpH/vJYzqpaPtjLlwBqvp6 jRWEqH4ulDRSyOXpPT3zPl5/31qARctyA3cNxNn3oDfCJqNyjy9B5Dt9F1GPC2yPIZ/a GiFd/INTy4RAwthCnvZKQ0osxCJQ4+0lqUKvtpdMPD0BOCVZ2+iNeuCD6XKOqRhkZRKt 2dmg== X-Gm-Message-State: APjAAAWOtOek1nLEi4N6MNE6ujkgyB5akCATRcGJhNWwBj38sw1qrDSQ snppxMcLSL2DEQt5xrDJYVSHjFlpfG8CRMFg54k= X-Google-Smtp-Source: APXvYqwmCRvE84KFxCeMh/0IWweVxJ39fvDwNnbs2brPjIzOv2tB+1J13V3lQAmGQ+5mfIDXLyHm5vV4h7MTg1C1rUA= X-Received: by 2002:a05:6808:658:: with SMTP id z24mr296168oih.91.1579103192495; Wed, 15 Jan 2020 07:46:32 -0800 (PST) MIME-Version: 1.0 References: <20200115124129.5684-1-madhuparnabhowmik04@gmail.com> <20200115135631.edr2nrfkycppxcku@debian> <20200115150426.svapzpux2tbbgvmn@debian> In-Reply-To: <20200115150426.svapzpux2tbbgvmn@debian> From: Madhuparna Bhowmik Date: Wed, 15 Jan 2020 21:16:21 +0530 Message-ID: To: Wei Liu Cc: "Paul E. McKenney" , paul@xen.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Joel Fernandes , xen-devel@lists.xenproject.org, linux-kernel-mentees@lists.linuxfoundation.org, davem@davemloft.net Subject: Re: [Linux-kernel-mentees] [PATCH] net: xen-netbank: hash.c: Use built-in RCU list checking X-BeenThere: linux-kernel-mentees@lists.linuxfoundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============8347422007043499957==" Errors-To: linux-kernel-mentees-bounces@lists.linuxfoundation.org Sender: "Linux-kernel-mentees" --===============8347422007043499957== Content-Type: multipart/alternative; boundary="000000000000da3b89059c2f9cc3" --000000000000da3b89059c2f9cc3 Content-Type: text/plain; charset="UTF-8" On Wed, Jan 15, 2020 at 8:34 PM Wei Liu wrote: > On Wed, Jan 15, 2020 at 07:36:38PM +0530, Madhuparna Bhowmik wrote: > [...] > > > > > The surrounding code makes it pretty clear that the lock is already > held > > > by the time list_for_each_entry_rcu is called, yet the checking > involved > > > in lockdep_is_held is not trivial, so I'm afraid I don't consider this > a > > > strict improvement over the existing code. > > > > > > Actually, we want to make CONFIG_PROVE_LIST_RCU enabled by default. > > I think you meant CONFIG_PROVE_RCU_LIST. > > I am sorry about this. Yes, I meant CONFIG_PROVE_RCU_LIST. > And if the cond argument is not passed when the usage of > > list_for_each_entry_rcu() > > is outside of rcu_read_lock(), it will lead to a false positive. > > Therefore, I think this patch is required. > > Fair enough. > > Thank you, Madhuparna > Wei. > --000000000000da3b89059c2f9cc3 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Wed, Jan 15, 2020 at 8:34 PM Wei L= iu <wei.liu@kernel.org> wro= te:
On Wed, Jan = 15, 2020 at 07:36:38PM +0530, Madhuparna Bhowmik wrote:
[...]
>
> > The surrounding code makes it pretty clear that the lock is alrea= dy held
> > by the time list_for_each_entry_rcu is called, yet the checking i= nvolved
> > in lockdep_is_held is not trivial, so I'm afraid I don't = consider this a
> > strict improvement over the existing code.
> >
> > Actually,=C2=A0 we want to make CONFIG_PROVE_LIST_RCU enabled by = default.

I think you meant CONFIG_PROVE_RCU_LIST.

I am sorry about this. Yes, I meant=C2=A0=C2=A0CONFIG= _PROVE_RCU_LIST.

> And if the cond argument is not passed when the usage of
> list_for_each_entry_rcu()
> is outside of rcu_read_lock(), it will lead to a false positive.
> Therefore, I think this patch is required.

Fair enough.

Thank you,
Madhuparna
=C2=A0
Wei.
--000000000000da3b89059c2f9cc3-- --===============8347422007043499957== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Linux-kernel-mentees mailing list Linux-kernel-mentees@lists.linuxfoundation.org https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees --===============8347422007043499957==-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.3 required=3.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 792E3C33CB1 for ; Wed, 15 Jan 2020 15:46:58 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 47FD72072B for ; Wed, 15 Jan 2020 15:46:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="AjsV29LT" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 47FD72072B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1irksN-0008Kh-1I; Wed, 15 Jan 2020 15:46:35 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1irksL-0008Kc-U6 for xen-devel@lists.xenproject.org; Wed, 15 Jan 2020 15:46:33 +0000 X-Inumbo-ID: 34594ae2-37ae-11ea-a985-bc764e2007e4 Received: from mail-oi1-x241.google.com (unknown [2607:f8b0:4864:20::241]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 34594ae2-37ae-11ea-a985-bc764e2007e4; Wed, 15 Jan 2020 15:46:33 +0000 (UTC) Received: by mail-oi1-x241.google.com with SMTP id d62so15751923oia.11 for ; Wed, 15 Jan 2020 07:46:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=8/BollNXFyqT/cepZYeE+wLWDM3dv1lO6PKhmKCFjP0=; b=AjsV29LTZILt+Wi6pF8lx8pQGcAjahEeD+b/nX3OlPUmbm9vpq3DxwuMAEoqab3oYn ZH/XJxFWed5LpRdLiMWm1Z7Yy5CdDcuD24HNKvDq9ATEkzDUuhSnLAh/WixOZ63hLss6 wzmW3OEKsmoaRmkJlodPsG96aokJxmN0G3xs24NlcZXTuTb72iyp4uznqkeIDk2zuxj5 XNa96XzGdulksUS2EW5wJrp6zqjSE9OuqCU21JFH+YoylZgOA+0XvdWotYm9bOy/Pz/7 Di410upJv7hYDpEFTwCOInlT4qbDWMCK/zYkV4d0wmEArNyS6SkT2ST0gedArukDAmB+ OyYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=8/BollNXFyqT/cepZYeE+wLWDM3dv1lO6PKhmKCFjP0=; b=gomIbzbsVLUbdM1J4x9SUYfiF7R7b22O8cbuUrQpxHdAaH1JN2q1DZPIUL+y5I9Qbb /BZ3WGKDR2j4ud+zQ5xkKlwXAHvkxmJaO0EIW5jmq8MrPSnB9mQLyqNuNnGYWPFGeLtJ EJSTPuVR6Bdn4N9iZVapPysO+rjo4cou0JDQPAupNGa3pfDwqXtg33jNnE3Wnhtt8Su6 K8ZgWHKLQsxWy/Ac+qDs7BPQxWR2gZZt3d8tvQWuw0ql5sDMRqJayZCSzeDosSCR6WY1 fwOPFIMK7H8EtbzoTXsk8kVFAFFuntK94FR3My36Nmn/2kMZq2WxjE6BrQrlwYM3Vz5y TCWw== X-Gm-Message-State: APjAAAW40jtNEhGkhxc+e8joLnGGs0wqXjHU4JQqV0iKRPVCcsJlbell anuSg1UG77ox1qUq8+XO54m5sGi7Aq/3hSnAYvU= X-Google-Smtp-Source: APXvYqwmCRvE84KFxCeMh/0IWweVxJ39fvDwNnbs2brPjIzOv2tB+1J13V3lQAmGQ+5mfIDXLyHm5vV4h7MTg1C1rUA= X-Received: by 2002:a05:6808:658:: with SMTP id z24mr296168oih.91.1579103192495; Wed, 15 Jan 2020 07:46:32 -0800 (PST) MIME-Version: 1.0 References: <20200115124129.5684-1-madhuparnabhowmik04@gmail.com> <20200115135631.edr2nrfkycppxcku@debian> <20200115150426.svapzpux2tbbgvmn@debian> In-Reply-To: <20200115150426.svapzpux2tbbgvmn@debian> From: Madhuparna Bhowmik Date: Wed, 15 Jan 2020 21:16:21 +0530 Message-ID: To: Wei Liu Subject: Re: [Xen-devel] [PATCH] net: xen-netbank: hash.c: Use built-in RCU list checking X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: "Paul E. McKenney" , paul@xen.org, netdev@vger.kernel.org, Amol Grover , linux-kernel@vger.kernel.org, Joel Fernandes , xen-devel@lists.xenproject.org, linux-kernel-mentees@lists.linuxfoundation.org, davem@davemloft.net Content-Type: multipart/mixed; boundary="===============7302355986954229554==" Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" --===============7302355986954229554== Content-Type: multipart/alternative; boundary="000000000000da3b89059c2f9cc3" --000000000000da3b89059c2f9cc3 Content-Type: text/plain; charset="UTF-8" On Wed, Jan 15, 2020 at 8:34 PM Wei Liu wrote: > On Wed, Jan 15, 2020 at 07:36:38PM +0530, Madhuparna Bhowmik wrote: > [...] > > > > > The surrounding code makes it pretty clear that the lock is already > held > > > by the time list_for_each_entry_rcu is called, yet the checking > involved > > > in lockdep_is_held is not trivial, so I'm afraid I don't consider this > a > > > strict improvement over the existing code. > > > > > > Actually, we want to make CONFIG_PROVE_LIST_RCU enabled by default. > > I think you meant CONFIG_PROVE_RCU_LIST. > > I am sorry about this. Yes, I meant CONFIG_PROVE_RCU_LIST. > And if the cond argument is not passed when the usage of > > list_for_each_entry_rcu() > > is outside of rcu_read_lock(), it will lead to a false positive. > > Therefore, I think this patch is required. > > Fair enough. > > Thank you, Madhuparna > Wei. > --000000000000da3b89059c2f9cc3 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Wed, Jan 15, 2020 at 8:34 PM Wei L= iu <wei.liu@kernel.org> wro= te:
On Wed, Jan = 15, 2020 at 07:36:38PM +0530, Madhuparna Bhowmik wrote:
[...]
>
> > The surrounding code makes it pretty clear that the lock is alrea= dy held
> > by the time list_for_each_entry_rcu is called, yet the checking i= nvolved
> > in lockdep_is_held is not trivial, so I'm afraid I don't = consider this a
> > strict improvement over the existing code.
> >
> > Actually,=C2=A0 we want to make CONFIG_PROVE_LIST_RCU enabled by = default.

I think you meant CONFIG_PROVE_RCU_LIST.

I am sorry about this. Yes, I meant=C2=A0=C2=A0CONFIG= _PROVE_RCU_LIST.

> And if the cond argument is not passed when the usage of
> list_for_each_entry_rcu()
> is outside of rcu_read_lock(), it will lead to a false positive.
> Therefore, I think this patch is required.

Fair enough.

Thank you,
Madhuparna
=C2=A0
Wei.
--000000000000da3b89059c2f9cc3-- --===============7302355986954229554== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KWGVuLWRldmVs IG1haWxpbmcgbGlzdApYZW4tZGV2ZWxAbGlzdHMueGVucHJvamVjdC5vcmcKaHR0cHM6Ly9saXN0 cy54ZW5wcm9qZWN0Lm9yZy9tYWlsbWFuL2xpc3RpbmZvL3hlbi1kZXZlbA== --===============7302355986954229554==--