Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1446408

Re: [RFC 3/3] kexec: extend kexec_file_load system call

From Mark Rutland <mark.rutland@arm.com>
Newsgroups linux.kernel
Subject Re: [RFC 3/3] kexec: extend kexec_file_load system call
Date 2016-07-19 14:50 +0200
Message-ID <rWCDg-44x-41@gated-at.bofh.it> (permalink)
References (4 earlier) <rW6Dn-jV-7@gated-at.bofh.it> <rWdES-4PX-31@gated-at.bofh.it> <rWry9-5fC-7@gated-at.bofh.it> <rWAUN-2Zq-11@gated-at.bofh.it> <rWCjU-3Wt-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue, Jul 19, 2016 at 08:24:06AM -0400, Vivek Goyal wrote:
> On Tue, Jul 19, 2016 at 11:52:00AM +0100, Mark Rutland wrote:
> > Regardless, this extended syscall changes some underlying assumptions
> > made with the development of kexec_file_load, and I think treating this
> > as an extension is not a great idea. From a user's perspective there is
> > little difference between passing an additional flag or using a
> > different syscall number, so I don't think that we gain much by altering
> > the existing prototype relative to allocating a new syscall number.
> 
> If we are providing/opening up additional flags, I can't think what will
> it break. Same flag was invalid in old kernel but new kernel supports 
> it and will accept it. So it sounds reasonable to me to add new flags.
> 
> If existing users are not broken, then I think it might be a good idea
> to extend existing syscall. Otherwise userspace will have to be modified
> to understand a 3rd syscall also and an additional option will show up
> which asks users to specify which syscall to use. So extending existing
> syscall might keep it little simple for users.

I don't follow.

To use the new feature, you have to modify userspace anyway, as you
require userspace to pass information which it did not previously pass
(in the new arguments added to the syscall).

The presence of a new syscall does not imply the absence of the old
syscall, so you can always use that be default unless the user asks for
asomething only the new syscall provides. Regardless of the
syscall/flags difference, you still have to detect whether the new
functionality is present somehow.

> BTW, does kexec_load() needs to be modified too to handle DT?

No, at least for arm64. In the kexec_load case userspace provides the
DTB as a raw segment, and the user-provided purgatory sets up registers
to pass that to the new kernel.

Thanks,
Mark.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[RFC 3/3] kexec: extend kexec_file_load system call AKASHI Takahiro <takahiro.akashi@linaro.org> - 2016-07-12 03:40 +0200
  Re: [RFC 3/3] kexec: extend kexec_file_load system call Vivek Goyal <vgoyal@redhat.com> - 2016-07-15 15:20 +0200
    Re: [RFC 3/3] kexec: extend kexec_file_load system call Mark Rutland <mark.rutland@arm.com> - 2016-07-15 15:30 +0200
      Re: [RFC 3/3] kexec: extend kexec_file_load system call Dave Young <dyoung@redhat.com> - 2016-07-18 04:40 +0200
        Re: [RFC 3/3] kexec: extend kexec_file_load system call Mark Rutland <mark.rutland@arm.com> - 2016-07-18 12:10 +0200
          Re: [RFC 3/3] kexec: extend kexec_file_load system call Dave Young <dyoung@redhat.com> - 2016-07-19 03:00 +0200
            Re: [RFC 3/3] kexec: extend kexec_file_load system call Mark Rutland <mark.rutland@arm.com> - 2016-07-19 13:00 +0200
              Re: [RFC 3/3] kexec: extend kexec_file_load system call Vivek Goyal <vgoyal@redhat.com> - 2016-07-19 14:30 +0200
                Re: [RFC 3/3] kexec: extend kexec_file_load system call Mark Rutland <mark.rutland@arm.com> - 2016-07-19 14:50 +0200
                Re: [RFC 3/3] kexec: extend kexec_file_load system call Vivek Goyal <vgoyal@redhat.com> - 2016-07-19 15:30 +0200
        RE: [RFC 3/3] kexec: extend kexec_file_load system call David Laight <David.Laight@ACULAB.COM> - 2016-07-20 13:50 +0200
          Re: [RFC 3/3] kexec: extend kexec_file_load system call Russell King - ARM Linux <linux@armlinux.org.uk> - 2016-07-21 11:30 +0200
    Re: [RFC 3/3] kexec: extend kexec_file_load system call Dave Young <dyoung@redhat.com> - 2016-07-18 04:40 +0200

csiph-web