From: Jarkko Sakkinen <jarkko@kernel.org>
To: sashiko-reviews@lists.linux.dev
Cc: Guicai Ma <maguicai@kylinos.cn>,
David Howells <dhowells@redhat.com>,
Paul Moore <paul@paul-moore.com>,
James Morris <jmorris@namei.org>,
"Serge E . Hallyn" <serge@hallyn.com>,
keyrings@vger.kernel.org, linux-security-module@vger.kernel.org
Subject: Re: [PATCH v3] KEYS: Protect key instantiation and rejection against type removal
Date: Thu, 26 Nov 2026 00:45:18 +0200 [thread overview]
Message-ID: <awdk_qvF3eAjhSFb@kernel.org> (raw)
In-Reply-To: <sashiko-outbox-232506@kernel.org>
On Wed, Nov 25, 2026 at 03:48:12AM +0000, sashiko-bot@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found 1 potential
> issue to consider:
> - [Medium] KEYS: key_reject_and_link() locks key->sem with freed modular
> lockdep class
> --
>
> commit c70f356b6ccdc592f27c6c5e32e3b0a02a265eb1
> Author: Guicai Ma <maguicai@kylinos.cn>
>
> KEYS: Protect key instantiation and rejection against type removal
>
> This commit guards key_instantiate_and_link() and key_reject_and_link()
> with key_type_srcu and a KEY_FLAG_DEAD check, and waits with
> synchronize_srcu(&key_type_srcu) after pass 1 of key_garbage_collector()
> marks dead keys.
Please rebase v4 onto linux-next, or my master.
When 'dead' is true in key_reject_and_link() under
key_construction_mutex alone, clear KEY_FLAG_USER_CONSTRUCT (and wake
waiters), and invalidate authkey while leaving key->state as
KEY_IS_UNINSTANTIATED.
wait_for_key_construction() will then return -EKEYREVOKED via
key_validate().
Br, Jarkko
next prev parent reply other threads:[~2026-11-25 22:45 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-24 5:33 [PATCH] KEYS: Protect the instantiate method against type removal Guicai Ma
2026-11-24 5:54 ` sashiko-bot
2026-11-24 9:12 ` [PATCH v2] KEYS: Protect key instantiation and rejection " Guicai Ma
2026-11-24 9:25 ` sashiko-bot
2026-11-24 16:27 ` Jarkko Sakkinen
2026-11-25 3:26 ` [PATCH v3] " Guicai Ma
2026-11-25 3:48 ` sashiko-bot
2026-11-25 22:45 ` Jarkko Sakkinen [this message]
2026-11-25 17:19 ` Jarkko Sakkinen
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=awdk_qvF3eAjhSFb@kernel.org \
--to=jarkko@kernel.org \
--cc=dhowells@redhat.com \
--cc=jmorris@namei.org \
--cc=keyrings@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=maguicai@kylinos.cn \
--cc=paul@paul-moore.com \
--cc=sashiko-reviews@lists.linux.dev \
--cc=serge@hallyn.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