From: bot+bpf-ci@kernel.org
To: jarkko@kernel.org,dhowells@redhat.com
Cc: jarkko@kernel.org,bpf@vger.kernel.org,dm-devel@lists.linux.dev,fsverity@lists.linux.dev,keyrings@vger.kernel.org,linux-doc@vger.kernel.org,linux-kernel@vger.kernel.org,linux-kselftest@vger.kernel.org,linux-security-module@vger.kernel.org,agk@redhat.com,agordeev@linux.ibm.com,ast@kernel.org,alexs@kernel.org,anastasia.eskova@ibm.com,akpm@linux-foundation.org,andrii@kernel.org,bmarzins@redhat.com,borntraeger@linux.ibm.com,daniel@iogearbox.net,dzm91@hust.edu.cn,eddyz87@gmail.com,emil@etsalapatis.com,ebiggers@kernel.org,ignat@linux.win,hca@linux.ibm.com,ihor.solodrai@linux.dev,James.Bottomley@HansenPartnership.com,jmorris@namei.org,jolsa@kernel.org,corbet@lwn.net,memxor@gmail.com,torvalds@linux-foundation.org,martin.lau@linux.dev,snitzer@kernel.org,mpatocka@redhat.com,zohar@linux.ibm.com,paul@paul-moore.com,oberpar@linux.ibm.com,rdunlap@infradead.org,roberto.sassu@huawei.com,serge@hallyn.com,skhan@linuxfoundation.org,song@kernel.org,svens@linux.ibm.com,tytso@mit.edu,gor@linux.ibm.com,
si.yanteng@linux.dev,yonghong.song@linux.dev,stable@vger.kernel.org,ast@kernel.org,andrii@kernel.org,daniel@iogearbox.net,martin.lau@kernel.org,eddyz87@gmail.com,yonghong.song@linux.dev,mason@kernel.org,ihor.solodrai@linux.dev
Subject: Re: [PATCH v11 1/6] s390/cert_store: Pin the user session keyring
Date: Sat, 14 Nov 2026 16:51:43 +0000 (UTC) [thread overview]
Message-ID: <caabf5117f03756c1c1b478d2a802c2a188996dde73545bbc552b6093484d557@mail.kernel.org> (raw)
In-Reply-To: <20261114161211.376859-2-jarkko@kernel.org>
[-- Attachment #1: Type: text/plain, Size: 2568 bytes --]
> s390/cert_store: Pin the user session keyring
TL;DR: Commit message only: the stable tag should be v6.6+, not v6.1+, and the
changelog's keyring-lifetime reason looks inaccurate. It also omits the new
ERR_PTR handling. The code change looks worthwhile.
> s390/cert_store: Pin the user session keyring
>
> The user session keyring stays alive only because the session keyring is
> pinned by current_cred().
>
> Pin the reference at:
>
> 1. find_cs_keyring()
> 2. cleanup_cs_keys()
> 3. create_cs_keyring()
>
> Cc: David Howells <dhowells@redhat.com>
> Cc: stable@vger.kernel.org # v6.1+
> Fixes: 8cf57d7217c3 ("s390: add support for user-defined certificates")
> Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
The stable tag says "# v6.1+", but the commit named in Fixes: is not in
v6.1. 8cf57d7217c3 is contained in v6.6 and not in v6.5, and
arch/s390/kernel/cert_store.c does not exist in v6.1 through v6.5, so there
is nothing to backport there.
The other patches in this series that fix the same commit use "# v6.6+".
Should this be:
Cc: stable@vger.kernel.org # v6.6+
The changelog says the user session keyring stays alive only because the
session keyring is pinned by current_cred(). Is that accurate?
look_up_user_keyrings() links the user session keyring into the per-user_ns
register:
ret = key_link(reg_keyring, session_keyring);
and get_user_register() notes that "the keyring is pinned by the user_ns".
That link is what normally keeps it alive.
cred->session_keyring is usually a different keyring, either a "_ses"
keyring from join_session_keyring() or pam_keyinit, or NULL. It is the user
session keyring only when install_session_keyring(user_session) happened to
run for that process.
The change itself looks worthwhile, since the owner has KEY_USR_ALL on that
keyring and can revoke or invalidate it, after which keyring_gc() can drop
the register link while cert_store still uses the pointer. Could the
changelog give that reason instead?
The changelog also does not mention that the three callers now handle an
ERR_PTR return from get_user_session_keyring(). Before this patch that
ERR_PTR was passed straight into keyring_search(), key_unlink() and
keyring_alloc(), which dereference keyring->type. Could that be described
as well?
---
AI reviewed your patch. Please fix the bug or email reply why it's not a bug.
See: https://github.com/kernel-patches/vmtest/blob/master/ci/claude/README.md
CI run summary: https://github.com/kernel-patches/bpf/actions/runs/43615900108
next prev parent reply other threads:[~2026-11-14 16:51 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-14 16:12 [PATCH v11 0/6] KEYS: Replace assoc_array with Jarkko Sakkinen
2026-11-14 16:12 ` [PATCH v11 1/6] s390/cert_store: Pin the user session keyring Jarkko Sakkinen
2026-11-14 16:51 ` bot+bpf-ci [this message]
2026-11-14 16:12 ` [PATCH v11 2/6] s390/cert_store: Return an owned reference from find_cs_keyring() Jarkko Sakkinen
2026-11-14 16:51 ` bot+bpf-ci
2026-11-14 16:12 ` [PATCH v11 3/6] s390/cert_store: Skip keys that disappeared during invalidation Jarkko Sakkinen
2026-11-14 16:12 ` [PATCH v11 4/6] KEYS: Introduce keyring_is_empty() Jarkko Sakkinen
2026-11-14 16:12 ` [PATCH v11 5/6] KEYS: Replace assoc_array with rhashtable Jarkko Sakkinen
2026-11-14 17:04 ` bot+bpf-ci
2026-11-14 16:12 ` [PATCH v11 6/6] lib: Remove assoc_array 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=caabf5117f03756c1c1b478d2a802c2a188996dde73545bbc552b6093484d557@mail.kernel.org \
--to=bot+bpf-ci@kernel.org \
--cc=James.Bottomley@HansenPartnership.com \
--cc=agk@redhat.com \
--cc=agordeev@linux.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=alexs@kernel.org \
--cc=anastasia.eskova@ibm.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bmarzins@redhat.com \
--cc=borntraeger@linux.ibm.com \
--cc=bpf@vger.kernel.org \
--cc=corbet@lwn.net \
--cc=daniel@iogearbox.net \
--cc=dhowells@redhat.com \
--cc=dm-devel@lists.linux.dev \
--cc=dzm91@hust.edu.cn \
--cc=ebiggers@kernel.org \
--cc=eddyz87@gmail.com \
--cc=emil@etsalapatis.com \
--cc=fsverity@lists.linux.dev \
--cc=gor@linux.ibm.com \
--cc=hca@linux.ibm.com \
--cc=ignat@linux.win \
--cc=ihor.solodrai@linux.dev \
--cc=jarkko@kernel.org \
--cc=jmorris@namei.org \
--cc=jolsa@kernel.org \
--cc=keyrings@vger.kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=martin.lau@kernel.org \
--cc=martin.lau@linux.dev \
--cc=mason@kernel.org \
--cc=memxor@gmail.com \
--cc=mpatocka@redhat.com \
--cc=oberpar@linux.ibm.com \
--cc=paul@paul-moore.com \
--cc=rdunlap@infradead.org \
--cc=roberto.sassu@huawei.com \
--cc=serge@hallyn.com \
--cc=si.yanteng@linux.dev \
--cc=skhan@linuxfoundation.org \
--cc=snitzer@kernel.org \
--cc=song@kernel.org \
--cc=stable@vger.kernel.org \
--cc=svens@linux.ibm.com \
--cc=torvalds@linux-foundation.org \
--cc=tytso@mit.edu \
--cc=yonghong.song@linux.dev \
--cc=zohar@linux.ibm.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®