From: Steffen Klassert <steffen.klassert@secunet.com>
To: Varad Gautam <varad.gautam@suse.com>
Cc: <linux-kernel@vger.kernel.org>,
linux-rt-users <linux-rt-users@vger.kernel.org>,
<netdev@vger.kernel.org>,
Herbert Xu <herbert@gondor.apana.org.au>,
"David S. Miller" <davem@davemloft.net>,
"Jakub Kicinski" <kuba@kernel.org>,
Florian Westphal <fw@strlen.de>,
"Ahmed S. Darwish" <a.darwish@linutronix.de>,
Frederic Weisbecker <frederic@kernel.org>,
<stable@vger.kernel.org>
Subject: Re: [PATCH] xfrm: policy: Restructure RCU-read locking in xfrm_sk_policy_lookup
Date: Mon, 21 Jun 2021 10:29:49 +0200 [thread overview]
Message-ID: <20210621082949.GX40979@gauss3.secunet.de> (raw)
In-Reply-To: <20210618141101.18168-1-varad.gautam@suse.com>
On Fri, Jun 18, 2021 at 04:11:01PM +0200, Varad Gautam wrote:
> Commit "xfrm: policy: Read seqcount outside of rcu-read side in
> xfrm_policy_lookup_bytype" [Linked] resolved a locking bug in
> xfrm_policy_lookup_bytype that causes an RCU reader-writer deadlock on
> the mutex wrapped by xfrm_policy_hash_generation on PREEMPT_RT since
> 77cc278f7b20 ("xfrm: policy: Use sequence counters with associated
> lock").
>
> However, xfrm_sk_policy_lookup can still reach xfrm_policy_lookup_bytype
> while holding rcu_read_lock(), as:
> xfrm_sk_policy_lookup()
> rcu_read_lock()
> security_xfrm_policy_lookup()
> xfrm_policy_lookup()
Hm, I don't see that call chain. security_xfrm_policy_lookup() calls
a hook with the name xfrm_policy_lookup. The only LSM that has
registered a function to that hook is selinux. It registers
selinux_xfrm_policy_lookup() and I don't see how we can call
xfrm_policy_lookup() from there.
Did you actually trigger that bug?
next prev parent reply other threads:[~2021-06-21 8:29 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-18 14:11 Varad Gautam
2021-06-21 8:29 ` Steffen Klassert [this message]
2021-06-21 9:11 ` Varad Gautam
2021-06-21 11:05 ` Steffen Klassert
2021-06-22 11:21 ` Steffen Klassert
2021-06-22 11:51 ` Frederic Weisbecker
2021-06-22 12:33 ` Steffen Klassert
2021-06-23 5:27 ` Steffen Klassert
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210621082949.GX40979@gauss3.secunet.de \
--to=steffen.klassert@secunet.com \
--cc=a.darwish@linutronix.de \
--cc=davem@davemloft.net \
--cc=frederic@kernel.org \
--cc=fw@strlen.de \
--cc=herbert@gondor.apana.org.au \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rt-users@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=varad.gautam@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®