All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pratyush Yadav <pratyush@kernel.org>
To: Mike Rapoport <rppt@kernel.org>
Cc: Pasha Tatashin <pasha.tatashin@soleen.com>,
	 Andrew Morton <akpm@linux-foundation.org>,
	 Pratyush Yadav <pratyush@kernel.org>,
	linux-kernel@vger.kernel.org,  kexec@lists.infradead.org,
	stable@vger.kernel.org
Subject: Re: [PATCH] liveupdate: validate session type before performing operation
Date: Tue, 26 May 2026 10:13:26 +0200	[thread overview]
Message-ID: <2vxzldd66121.fsf@kernel.org> (raw)
In-Reply-To: <177978294141.4088010.16047486364171482805.b4-ty@b4> (Mike Rapoport's message of "Tue, 26 May 2026 11:09:24 +0300")

On Tue, May 26 2026, Mike Rapoport wrote:

> From: Mike Rapoport (Microsoft) <rppt@kernel.org>
>
> 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


      reply	other threads:[~2026-05-26  8:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-19 12:24 [PATCH] liveupdate: validate session type before performing operation Pratyush Yadav
2026-05-19 14:11 ` Pasha Tatashin
2026-05-19 14:29   ` Pratyush Yadav
2026-05-26  8:09 ` Mike Rapoport
2026-05-26  8:13   ` Pratyush Yadav [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2vxzldd66121.fsf@kernel.org \
    --to=pratyush@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=kexec@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pasha.tatashin@soleen.com \
    --cc=rppt@kernel.org \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.