key_update(9)
π NAME π
okay so bestie, this is key_update(9) from the Kernel API Manual, and it's literally the page about updating a key's contents. No cap.
key_updateβ Update a key's contents.
β¨ SYNOPSIS β¨
int key_update (key_ref_t key_ref , const void *payload , size_t plen );
π«Ά ARGUMENTS π«Ά
key_refβ The pointer (plus possession flag) to the key. Yes, the whole package, bestie.payloadβ The data to be used to update the key. This is the new content vibe.plenβ The length ofpayload. Gotta tell it how much data we're working with.
π₯ DESCRIPTION π₯
Attempt to update the contents of a key with the given payload data. The caller must be granted Write permission on the key β no permission, no update, periodt. Negative keys can be instantiated by this method, which is lowkey iconic.
Returns 0 on success, -EACCES if not permitted, and -EOPNOTSUPP if the key type does not support updating. The key type may return other errors β so if you see something else, that's the key type doing its own thing, iykyk.
π SEE ALSO π
Kernel file ./security/keys/key.c β and the whole bestie squad:
key_alloc(9)key_payload_reserve(9)key_instantiate_and_link(9)key_reject_and_link(9)key_put(9)key_create_or_update(9)key_create(9)key_revoke(9)key_invalidate(9)generic_key_instantiate(9)register_key_type(9)unregister_key_type(9)
mwah π β source/version: ./security/keys, dated October 2026. π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms