From: sashiko-bot@kernel.org
Cc: linux-security-module@vger.kernel.org
Subject: Re: [PATCH v9 2/3] KEYS: Replace assoc_array with rhashtable
Date: Tue, 10 Nov 2026 05:56:35 +0000 [thread overview]
Message-ID: <sashiko-outbox-206357@kernel.org> (raw)
In-Reply-To: <20261110053323.2936729-3-jarkko@kernel.org>
> The keyrings subsystem is the sole user of assoc_array. It has over 1700
> lines of code, no test suite, and a long history of bugs, with LLMs now
> finding more.
>
> This unfortunate outcome has evolved over time by large from the shortage
> of in-kernel callers, time bandwidth and 3rd party contributors.
>
> What the keyrings needs is just a generic key-value store, which performs
> well with sparse key sets.
>
> Replace struct assoc_array in struct key with struct keyring_index:
>
> - keyring_index: holds an rhashtable for direct lookups, an RCU-protected
> list of keyring_link entries for stable walks, the active link count, and
> an rcu_work item for deferred teardown.
> [ ... ]
> Suggested-by: Eric Biggers <ebiggers@kernel.org>
> Co-developed-by: Linus Torvalds <torvalds@linux-foundation.org>
> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
> Reviewed-by: Eric Biggers <ebiggers@kernel.org>
> Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261110053323.2936729-1-jarkko@kernel.org?part=2
next prev parent reply other threads:[~2026-11-10 5:56 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-10 5:33 [PATCH v9 0/3] KEYS: Replace assoc_array with rhashtable Jarkko Sakkinen
2026-11-10 5:33 ` [PATCH v9 1/3] KEYS: Introduce keyring_is_empty() Jarkko Sakkinen
2026-11-10 5:39 ` sashiko-bot
2026-11-10 5:33 ` [PATCH v9 2/3] KEYS: Replace assoc_array with rhashtable Jarkko Sakkinen
2026-11-10 5:56 ` sashiko-bot [this message]
2026-11-10 6:06 ` Jarkko Sakkinen
2026-11-10 5:33 ` [PATCH v9 3/3] lib: Remove assoc_array Jarkko Sakkinen
2026-11-10 5:58 ` 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-206357@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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