[PATCH] kexec: Add option to fallback to old kexec syscall when kexec file based syscall failed

Baoquan He bhe at redhat.com
Thu Jul 14 07:12:05 PDT 2016


On 07/14/16 at 06:35pm, joeyli wrote:
> Hi Baoquan, 
> 
> Thanks for your response!
> 
> On Thu, Jul 14, 2016 at 05:51:24PM +0800, Baoquan He wrote:
> > On 07/14/16 at 04:45pm, Lee, Chun-Yi wrote:
> > > This patch adds a new "--fallback-kexec" option to give a chance to
> > > fallback to old kexec syscall when file based kexec syscall operation
> > > failed.
> > > 
> > > This option works with --kexec-file-syscall to provide more flexible
> > > way to adapt to different kernels that those kernels built with
> > > different kexec syscall config or have different verification policy.
> > 
> > Usually distribuition system uses script to build a framework to
> > connect the kexec/kdump, makedumpfile utility chain. This can make user
> > execute a very simple script command to implement kexec load or kexec
> > jumping job. In this case script can do what you are trying to do.
> > 
> 
> Yes, the fallback function can be implemented by script. But a new kexec
> option is useful to the distro that it may not provides help scripts to
> user.
> 
> > Besides, have you actually met that kexec-file failed but old kexec
> > syscall works? I mean how did you test it? I am wondering when it will
> > happen.
> > 
> > Thanks
> > Baoquan
> >
> 

I understand, thanks for telling, Joey Lee.

However it seems not very necessary to me. So leave this to other
people, see if you can get support and an Acked-by.

Thanks
Baoquan

> The currently mainline kernel allows to set CONFIG_KEXEC or CONFIG_KEXEC_FILE
> individual. So if kexec found that the file based kexec syscall isn't
> available then this is a case to fallback to old kexec.
> 
> Another case is when KEXEC_VERIFY_SIG is set, The fallback function is more
> convenient to user to build his own kernel for using or testing. The kexec
> tool can try old syscall when verification failed.



More information about the kexec mailing list