STRUCT LIVEUPDATE_SESSION_RETRIEVE_FD(9)
πΈ NAME πΈ
okay bestie, this is the page for struct liveupdate_session_retrieve_fd β aka the struct behind ioctl(LIVEUPDATE_SESSION_RETRIEVE_FD). Itβs from the Kernel API Manual, section 9, and itβs literally the glow-up moment where a preserved fd gets restored. π
β¨ SYNOPSIS β¨
struct liveupdate_session_retrieve_fd {
__u32 size;
__s32 fd;
__aligned_u64 token;
};
π Members π
sizeβ Input;sizeof(struct liveupdate_session_retrieve_fd). Itβs giving βknow your size before you slide in,β fr fr.fdβ Output; the new file descriptor representing the fully restored kernel resource. This is the main character right here. πtokenβ Input; an opaque token that was used to preserve the resource. No peeking inside, bestie β itβs opaque for a reason. π
π¦ Description π¦
Retrieve a previously preserved file descriptor. Thatβs the whole vibe. π«Ά
User sets the token field to the value obtained from a successful LIVEUPDATE_IOCTL_FD_PRESERVE call before the live update. On success, the kernel restores the state (saved during the PREPARE/FREEZE phases) associated with the token and populates the fd field with a new file descriptor referencing the restored resource in the current (new) kernel. Slay. β¨
This operation must be performed before signaling completion via LIVEUPDATE_IOCTL_FINISH. Do not skip this, bestie β thatβs not a vibe check you wanna fail. π
If a retrieve of a token fails, subsequent attempts to retrieve the token fail with the same error code. Failed retrieves are not retried. Periodt. No cap. π«
π Return π
0 on success, negative error code on failure (e.g., invalid token). Thatβs it. Thatβs the whole mood. π
π SEE ALSO π
- Kernel file
./include/uapi/linux/liveupdate.h - General
ioctlformat(9) struct liveupdate_ioctl_create_session(9)struct liveupdate_ioctl_retrieve_session(9)struct liveupdate_session_preserve_fd(9)struct liveupdate_session_finish(9)struct liveupdate_session_get_name(9)
shoutout to the source path ./include/uapi/linux, dated October 2026, page struct live..._retrieve_fd(9) β she ate and left no crumbs ππ§π
π¦ 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