On Tue, May 26 2026, Mike Rapoport wrote: > From: Mike Rapoport (Microsoft) <[email protected]> > > On Tue, 19 May 2026 14:24:26 +0200, Pratyush Yadav wrote: >> The sessions ioctls are not applicable to all session types. PRESERVE_FD >> is only applicable to outgoing sessions. RETRIEVE_FD and FINISH are only >> valid for incoming session. Calling a incoming ioctl on an outgoing >> session is invalid and can cause file handlers to run into unexpected >> errors. >> >> For example, a user can create a (outgoing) session, preserve a memfd, >> and then immediately do a retrieve without doing a kexec in between. >> This would result in memfd's retrieve handler to run. The handlers >> expects to be called from a post-kexec context, and will try to do a >> kho_restore_vmalloc() or kho_restore_folio() to try and restore memory. >> >> [...] > > Applied to fixes branch of liveupdate/linux.git tree, thanks!
Thanks! I will test the selftest update that Pasha suggested as a follow up, since that will be content for liveupdate/next. > > [1/1] liveupdate: validate session type before performing operation > commit: da7f658ccc8da60d836051a7af1c53e643f4bd11 > > tree: https://git.kernel.org/pub/scm/linux/kernel/git/liveupdate/linux > branch: fixes > > -- > Sincerely yours, > Mike. > -- Regards, Pratyush Yadav
