[PATCH v4 2/5] kexec: do not special-case the -s option
Michal Suchánek
msuchanek at suse.de
Fri Mar 16 04:38:13 PDT 2018
On Fri, 16 Mar 2018 12:20:25 +0100
Simon Horman <horms at verge.net.au> wrote:
> On Thu, Mar 15, 2018 at 12:13:18PM +0100, Michal Suchánek wrote:
> > On Thu, 15 Mar 2018 11:38:30 +0100
> > Simon Horman <horms at verge.net.au> wrote:
> > >
> > >
> > > if (do_load && (kexec_flags & KEXEC_ON_CRASH) &&
> > > !is_crashkernel_mem_reserved()) {
> > > die("Memory for crashkernel is not reserved\n"
> > > "Please reserve memory by passing"
> > > "\"crashkernel=X at Y\" parameter to kernel\n"
> > > "Then try to loading kdump kernel\n");
> > > }
> >
> > Do you not need memory for kexec -s? This looks broken to start
> > with.
>
> Could you propose a fix? I realise your patchset may not introduce
> this problem. But it seems to me that it makes things slightly worse
> or at the very least perpetuates the notion that the above is correct.
Yes, it makes sense to fix the condition.
>
> > > ...
> > >
> > > if ((result == 0) && do_load_jump_back_helper) {
> >
> > And yes, this should not be allowed with -s
>
> Is the simple fix here for your patch to add an extra condition
> to the if statement above?
This is not supported with -s but nothing prevents setting the flag. So
a test for kexec_load should be added I guess.
Thanks
Michal
More information about the kexec
mailing list