[PATCH v3 1/4] kexec: simplify compat_sys_kexec_load
Arnd Bergmann
arnd at kernel.org
Wed May 19 02:55:05 PDT 2021
On Wed, May 19, 2021 at 12:45 AM Eric W. Biederman
<ebiederm at xmission.com> wrote:
> Arnd Bergmann <arnd at kernel.org> writes:
> > On Tue, May 18, 2021 at 4:05 PM Arnd Bergmann <arnd at kernel.org> wrote:
> >> On Tue, May 18, 2021 at 3:41 PM Eric W. Biederman <ebiederm at xmission.com> wrote:
>
> I think something like the untested diff below is enough to get rid of
> compat_alloc_user cleanly.
>
> Certainly it should be enough to give any idea what I am thinking.
Yes, that looks sufficient to me. I had started a slightly different
approach by trying
to move the kimage_alloc_init() into the top-level entry points to
avoid the extra
kmalloc, but that got rather complicated, and your patch is simpler overall.
The allocation could still be combined with kexec_load_check() into a new
function to reduce the number of duplicate lines, but if you think the current
version is ok, then I'll leave this part as it is.
I've fixed a duplicate kfree() and some whitespace damage, and rebased the
rest of my series on top of this to give it a spin on the build test boxes.
I'll send a v4 series once I have made sure there are no build-time regressions.
Can I add your Signed-off-by for the patch?
Is there a set of tests I should run on it?
Arnd
More information about the kexec
mailing list