Skip to content

Commit 608d164

Browse files
blucarppt
authored andcommitted
liveupdate: document systemd support
systemd v261 will add native support for LUO via the file descriptor store mechanism. Add a brief paragraph in the LUO userspace documentation page to inform users. Signed-off-by: Luca Boccassi <luca.boccassi@gmail.com> Reviewed-by: Pasha Tatashin <pasha.tatashin@soleen.com> Acked-by: Pratyush Yadav <pratyush@kernel.org> Link: https://patch.msgid.link/20260519152957.548119-1-luca.boccassi@gmail.com Signed-off-by: Pasha Tatashin <pasha.tatashin@soleen.com> Signed-off-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
1 parent 0e39380 commit 608d164

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

Documentation/userspace-api/liveupdate.rst

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,29 @@ ioctl uAPI
1414
===========
1515
.. kernel-doc:: include/uapi/linux/liveupdate.h
1616

17+
Userspace Integration
18+
=====================
19+
20+
systemd (since version v261) uses LUO to preserve its per-service file
21+
descriptor store across a kexec-based live update. Services opt in by setting
22+
``FileDescriptorStoreMax=`` and ``FileDescriptorStorePreserve=`` in their unit,
23+
and push file descriptors with a name into the store via
24+
``sd_pid_notify_with_fds(... "FDSTORE=1\nFDNAME=foo")``.
25+
26+
Services may also create their own LUO sessions (via ``/dev/liveupdate``) and
27+
push the resulting session fds into their file descriptor store like any other
28+
fd. systemd detects such session fds and handles them accordingly, and
29+
hands the re-retrieved session fd back to the service after kexec, using the
30+
existing file descriptor store service interface.
31+
32+
For details, see:
33+
34+
- `File Descriptor Store <https://systemd.io/FILE_DESCRIPTOR_STORE/>`_
35+
- `systemd.service(5) FileDescriptorStorePreserve=
36+
<https://www.freedesktop.org/software/systemd/man/latest/systemd.service.html#FileDescriptorStorePreserve=>`_
37+
- `sd_pid_notify_with_fds(3)
38+
<https://www.freedesktop.org/software/systemd/man/latest/sd_pid_notify_with_fds.html>`_
39+
1740
See Also
1841
========
1942

0 commit comments

Comments
 (0)