Re: [PATCH v6 05/20] liveupdate: luo_ioctl: add user interface

From: Pasha Tatashin

Date: Mon Nov 17 2025 - 09:25:51 EST


> > --- 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.

> > +/**
> > + * 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.

> > + 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