Conversation

Jarkko Sakkinen

Edited 6 days ago

I’m working on getting key_type_dead wiped off from Linux.

This changes behavior from rmmod always succeeding into returning -EBUSY if callers have the LKM pinned, which is what any normal LKM does.

So while this would be so much better it might require tweaks to the user space. I have no idea. I will test the changes with SystemD at least, which I already have as part of my regular kernel test image.

This will be bundled into keyring GC sanitization patch set that I’ll send later today. It also includes a patch that amortizes work items into 64 key chunks in order to resolve workqueue lockups (with only ~2% added to the time taken by serial tree traversal).

EDIT:

v2: https://lore.kernel.org/keyrings/20261103030226.2685251-1-jarkko@kernel.org/

#linux #keyring #systemd @pid_eins

1
1
1
dns_resolver is particularly hideous corner case of key_type.
1
0
0
I got some good feedback from David, which helps me to still continue this in the same track that it is already i.e., proper module pinning. I also PoC'd an alternative approach if this turns into a dead end (which is still entirely possible).
0
0
0