STRUCT LIVEUPDATE_SESSION_RETRIEVE_FD(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 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 ioctl format(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