summaryrefslogtreecommitdiff
path: root/rust/zerocopy-derive/derive/git@git.tavy.me:linux.git
diff options
context:
space:
mode:
authorMichael Bommarito <michael.bommarito@gmail.com>2026-07-19 12:15:04 -0400
committerJarkko Sakkinen <jarkko@kernel.org>2026-07-23 18:23:39 +0300
commit58565eef0f8d861aae92abfb7658458d661cee17 (patch)
treeb51920f95ff6c4f964b42aacd21bb6f7d98c8a69 /rust/zerocopy-derive/derive/git@git.tavy.me:linux.git
parent63918731f9ae25b5deb022f118e941e6dddfcef4 (diff)
keys: make keyring key-chunk byte order agree with keyring_diff_objects()
keyring_get_key_chunk() loads description bytes into the index chunk low address first, while keyring_diff_objects() numbers the first differing bit from the low end and folds the absolute byte index into the level without removing the inline-prefix offset the level already carries. The two disagree on byte order and bit position, so the array can be told two keys first differ at a bit that does not differ in the chunk the walker uses, letting crafted descriptions collide into one node. Load the chunk in the order keyring_diff_objects() assumes and drop the inline-prefix length when folding the byte index into the level. This only changes the in-memory ordering used to place keys within a keyring; add, search and read of non-colliding keys are unaffected. Fixes: f771fde82051 ("keys: Simplify key description management") Assisted-by: Claude:claude-opus-4-8 Signed-off-by: Michael Bommarito <michael.bommarito@gmail.com> Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org> Tested-by: Jarkko Sakkinen <jarkko@kernel.org> Link: https://lore.kernel.org/r/20260719161505.2423935-3-michael.bommarito@gmail.com Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
Diffstat (limited to 'rust/zerocopy-derive/derive/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions