Re: [PATCH v6 05/20] liveupdate: luo_ioctl: add user interface
From: Pasha Tatashin <pasha.tatashin@soleen.com>
Date: 2025-11-17 14:22:56
Also in:
linux-doc, linux-fsdevel, linux-mm, lkml
From: Pasha Tatashin <pasha.tatashin@soleen.com>
Date: 2025-11-17 14:22:56
Also in:
linux-doc, linux-fsdevel, linux-mm, lkml
quoted
--- a/include/uapi/linux/liveupdate.h +++ b/include/uapi/linux/liveupdate.h@@ -44,6 +44,70 @@ #define LIVEUPDATE_IOCTL_TYPE 0xBA /* The maximum length of session name including null termination */ -#define LIVEUPDATE_SESSION_NAME_LENGTH 56 +#define LIVEUPDATE_SESSION_NAME_LENGTH 64
Ah, here I updated the session name length :-) I will move this change to the proper patch.
quoted
+/** + * struct liveupdate_ioctl_create_session - ioctl(LIVEUPDATE_IOCTL_CREATE_SESSION) + * @size: Input; sizeof(struct liveupdate_ioctl_create_session) + * @fd: Output; The new file descriptor for the created session. + * @name: Input; A null-terminated string for the session name, max + * length %LIVEUPDATE_SESSION_NAME_LENGTH including termination + * char.Nit: ^ character
Done.
quoted
+ if (atomic_cmpxchg(&ldev->in_use, 0, 1)) + return -EBUSY; + + luo_session_deserialize();Why luo_session_deserialize() is tied to the first open of the chardev?
Because at this point, when `/dev/liveupdate` is opened we expect that userspace has finished loading modules that might register File-Handlers, and FLBs, with LUO, and therefore we can deserialize the sessions and find all the rightful owners for FDs. After this point, we also forbid registering new FHs and FLBs. Pasha