Re: Does anyone actually use KEXEC_JUMP?

From: Eric W. Biederman
Date: Mon Dec 16 2024 - 13:25:13 EST


David Woodhouse <dwmw2@xxxxxxxxxxxxx> writes:

> It isn't broken. I know of it being used a few million times a week.
>
> There are corner cases which have never worked right, like the callee
> putting a different return address for its next invocation, on the
> stack *above* the address it 'ret's to. Which since the first kjump
> patch has been the first word of the page *after* the swap page (and
> is now fixed in my tree). But fundamentally it *does* work.
>
> I only started messing with it because I was working on
> relocate_kernel() and needed to write a test case for it; the fact
> that I know of it being used in production is actually just a
> coincidence.

Cool. I had the sense that the original developer never got around
to using it, so I figured I should check.

Mind if I ask what you know of it being used for?

I had imagined it might be a way to call firmware code preventing the
need to code of a specific interface for each type of firmware.

Eric