From: sashiko-bot@kernel.org
To: "Manuel Huber" <manuelh@nvidia.com>, "Fan Wu" <wufan@kernel.org>,
"David Howells" <dhowells@redhat.com>,
"Jarkko Sakkinen" <jarkko@kernel.org>
Cc: "Christian Brauner" <brauner@kernel.org>,
"Andrew Halaney" <andrew@amutable.com>,
"Paul Moore" <paul@paul-moore.com>,
"James Morris" <jmorris@namei.org>,
"Serge E. Hallyn" <serge@hallyn.com>,
"Jonathan Corbet" <corbet@lwn.net>,
"Shuah Khan" <skhan@linuxfoundation.org>,
"Randy Dunlap" <rdunlap@infradead.org>,
"Luca Boccassi" <luca.boccassi@gmail.com>,
"James Bottomley" <James.Bottomley@HansenPartnership.com>,
linux-security-module@vger.kernel.org, keyrings@vger.kernel.org,
kexec@lists.infradead.org
Subject: Re: [PATCH v2 2/3] keys: add KEY_SPEC_IPE_KEYRING
Date: Thu, 29 Oct 2026 00:50:01 +0000 [thread overview]
Message-ID: <sashiko-outbox-188577@kernel.org> (raw)
In-Reply-To: <20261029-b4-ipe-keyring-rfc-v2-2-77727b205844@nvidia.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] keys: KEY_SPEC_IPE_KEYRING uses -12 assuming nonexistent keyring IDs
--
commit 44da1efd13cdd5eb92238870e4d4626fe42f170e
Author: Manuel Huber <manuelh@nvidia.com>
keys: add KEY_SPEC_IPE_KEYRING
This commit adds the KEY_SPEC_IPE_KEYRING (-12) special key ID so that
userspace can directly reference the .ipe keyring via lookup_user_key()
without resolving it through process keyrings or /proc/keys.
> keys: add KEY_SPEC_IPE_KEYRING
>
> The BPF, dm-verity, and fs-verity keyrings have well-known IDs which
> allow userspace to directly address them. This commit follows the same
> pattern for the .ipe keyring.
>
> This provides a direct interface independent of resolving %:.ipe through
> process keyrings and /proc/keys.
>
> Signed-off-by: Manuel Huber <manuelh@nvidia.com>
>
> diff --git a/Documentation/security/keys/core.rst b/Documentation/security/keys/core.rst
> index 326b8a9738289..64b37817a3356 100644
> --- a/Documentation/security/keys/core.rst
> +++ b/Documentation/security/keys/core.rst
> @@ -373,6 +373,18 @@ process making the call::
> KEY_SPEC_REQKEY_AUTH_KEY -7 assumed request_key()
> authorisation key
>
> +There are also values that refer to a specific kernel keyring rather than to
> +anything belonging to the caller. These well-known IDs allow userspace to
> +name kernel keyrings directly even when they are not linked into a process
> +keyring::
> +
> + CONSTANT VALUE KEY REFERENCED
> + ============================== ====== ===========================
> + KEY_SPEC_IPE_KEYRING -12 the ".ipe" keyring
> +
> +The availability of a subsystem keyring depends on its kernel configuration.
> +Looking up an unavailable keyring returns ``ENOKEY``.
> +
>
> The main syscalls are:
>
[ ... ]
> diff --git a/include/uapi/linux/keyctl.h b/include/uapi/linux/keyctl.h
> index 4c8884eea8084..e42fca286b156 100644
> --- a/include/uapi/linux/keyctl.h
> +++ b/include/uapi/linux/keyctl.h
> @@ -24,6 +24,7 @@
> #define KEY_SPEC_GROUP_KEYRING -6 /* - key ID for GID-specific keyring */
> #define KEY_SPEC_REQKEY_AUTH_KEY -7 /* - key ID for assumed request_key auth key */
> #define KEY_SPEC_REQUESTOR_KEYRING -8 /* - key ID for request_key() dest keyring */
> +#define KEY_SPEC_IPE_KEYRING -12 /* - key ID for the .ipe keyring */
[Severity: Medium]
The commit message states that the BPF, dm-verity, and fs-verity keyrings
have well-known IDs, and defines KEY_SPEC_IPE_KEYRING as -12 immediately
after KEY_SPEC_REQUESTOR_KEYRING (-8) in include/uapi/linux/keyctl.h.
However, in the kernel tree, none of the BPF, dm-verity, or fs-verity
keyrings have KEY_SPEC_* IDs in include/uapi/linux/keyctl.h,
Documentation/security/keys/core.rst, or lookup_user_key() in
security/keys/process_keys.c.
This leaves an unexplained gap (-9 through -11) in the UAPI numbering and
makes KEY_SPEC_IPE_KEYRING (-12) the sole entry in the kernel keyring table
in Documentation/security/keys/core.rst.
Was this patch based on an unmerged series that assigned -9, -10, and -11 to
those keyrings, and should the numbering and commit description be adjusted
to match the current tree?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261029-b4-ipe-keyring-rfc-v2-0-77727b205844@nvidia.com?part=2
next prev parent reply other threads:[~2026-10-29 0:50 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-29 0:30 [PATCH v2 0/3] IPE: add a dedicated policy keyring Manuel Huber via B4 Relay
2026-10-29 0:30 ` [PATCH v2 1/3] ipe: add the .ipe " Manuel Huber via B4 Relay
2026-10-29 0:50 ` sashiko-bot
2026-10-29 0:30 ` [PATCH v2 2/3] keys: add KEY_SPEC_IPE_KEYRING Manuel Huber via B4 Relay
2026-10-29 0:50 ` sashiko-bot [this message]
2026-10-29 0:30 ` [PATCH v2 3/3] Documentation: ipe: document the IPE keyring Manuel Huber via B4 Relay
2026-10-29 0:37 ` sashiko-bot
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=sashiko-outbox-188577@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=James.Bottomley@HansenPartnership.com \
--cc=andrew@amutable.com \
--cc=brauner@kernel.org \
--cc=corbet@lwn.net \
--cc=dhowells@redhat.com \
--cc=jarkko@kernel.org \
--cc=jmorris@namei.org \
--cc=kexec@lists.infradead.org \
--cc=keyrings@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=luca.boccassi@gmail.com \
--cc=manuelh@nvidia.com \
--cc=paul@paul-moore.com \
--cc=rdunlap@infradead.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=serge@hallyn.com \
--cc=skhan@linuxfoundation.org \
--cc=wufan@kernel.org \
/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