From: Jarkko Sakkinen <jarkko@kernel.org>
To: bot+bpf-ci@kernel.org
Cc: dhowells@redhat.com, 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,
martin.lau@kernel.org, mason@kernel.org
Subject: Re: [PATCH v13 6/7] KEYS: Replace assoc_array with rhashtable
Date: Sat, 14 Nov 2026 22:38:10 +0200 [thread overview]
Message-ID: <avjGskpYTWp_JGHd@kernel.org> (raw)
In-Reply-To: <717a43d830b7a6544a51f3c227592eaadcd0afcf61ec9bf922ad517a280b8bfe@mail.kernel.org>
On Sat, Nov 14, 2026 at 08:24:27PM +0000, bot+bpf-ci@kernel.org wrote:
> > + * The walk is RCU-protected, so the keyring's semaphore is not required. A
> > + * keyring modified concurrently may list a key twice or miss one, but it can
> > + * never have a link freed under the walk.
>
> Could the comment instead say that the caller holds the keyring's semaphore,
> which keeps the list and the link count stable across the walk and the
> length calculation, with RCU only keeping the walk itself memory-safe?
If I did not miss anything, this is the only remark.
Hmm...
I think this is enough prose to capture the preconditions:
/*
* The list and link count are stable across the walk as the caller
* holds keyring->sem.
*/
Br, Jarkko
next prev parent reply other threads:[~2026-11-14 20:38 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-14 19:36 [PATCH v13 0/7] KEYS: Replace assoc_array with rhashtable Jarkko Sakkinen
2026-11-14 19:36 ` [PATCH v13 1/7] s390/cert_store: Pin the user session keyring Jarkko Sakkinen
2026-11-14 19:50 ` sashiko-bot
2026-11-14 19:36 ` [PATCH v13 2/7] s390/cert_store: Return an owned reference from find_cs_keyring() Jarkko Sakkinen
2026-11-14 19:47 ` sashiko-bot
2026-11-14 19:36 ` [PATCH v13 3/7] s390/cert_store: Skip keys that disappeared during invalidation Jarkko Sakkinen
2026-11-14 19:46 ` sashiko-bot
2026-11-14 19:36 ` [PATCH v13 4/7] s390/cert_store: Read-lock keyring semaphore in invalidate_keyring_keys() Jarkko Sakkinen
2026-11-14 19:42 ` sashiko-bot
2026-11-14 19:36 ` [PATCH v13 5/7] KEYS: Introduce keyring_is_empty() Jarkko Sakkinen
2026-11-14 19:41 ` sashiko-bot
2026-11-14 19:36 ` [PATCH v13 6/7] KEYS: Replace assoc_array with rhashtable Jarkko Sakkinen
2026-11-14 19:54 ` sashiko-bot
2026-11-14 20:24 ` bot+bpf-ci
2026-11-14 20:38 ` Jarkko Sakkinen [this message]
2026-11-14 19:36 ` [PATCH v13 7/7] lib: Remove assoc_array Jarkko Sakkinen
2026-11-14 19:44 ` 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=avjGskpYTWp_JGHd@kernel.org \
--to=jarkko@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=bot+bpf-ci@kernel.org \
--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=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=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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.