All of lore.kernel.org
 help / color / mirror / Atom feed
From: AKASHI Takahiro <takahiro.akashi@linaro.org>
To: Thiago Jung Bauermann <bauerman@linux.vnet.ibm.com>
Cc: Dave Young <dyoung@redhat.com>,
	kexec@lists.infradead.org, ebiederm@xmission.com, bhe@redhat.com,
	vgoyal@redhat.com, will.deacon@arm.com, catalin.marinas@arm.com,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linuxppc-dev@lists.ozlabs.org
Subject: Re: [RFC] arm64: kexec_file_load support
Date: Mon, 11 Jul 2016 16:19:35 +0900	[thread overview]
Message-ID: <20160711071934.GZ20774@linaro.org> (raw)
In-Reply-To: <11139482.zLvCKVycQr@hactar>

On Fri, Jul 08, 2016 at 11:48:44AM -0300, Thiago Jung Bauermann wrote:
> Am Donnerstag, 07 Juli 2016, 14:12:45 schrieb Dave Young:
> > If so maybe change a bit from your precious mentioned 7 args proposal like
> > below?
> > 
> > struct kexec_file_fd {
> > 	enum kexec_file_type;
> > 	int fd;
> > }
> > 
> > struct kexec_fdset {
> > 	int nr_fd;
> > 	struct kexec_file_fd fd[0];
> > }
> > 
> > int kexec_file_load(int kernel_fd, int initrd_fd,
> > 		    unsigned long cmdline_len, const char *cmdline_ptr,
> > 		    unsigned long flags, struct kexec_fdset *extra_fds);
> 
> 
> Is there a way for the kernel to distinguish whether the process passed 5 or 
> 6 arguments? How can it know whether extra_fds is a valid argument or just 
> garbage? I think we have to define a new flag KEXEC_FILE_EXTRA_FDS so that 
> the process can signal that it is using the new interface.

Good point. What I had in my mind is "open" system call.
Glibc's implementation of open() checks for the second argument, flags,
to determine whether or not the third argument, mode, is required.

So our current consensus is that, for the time being, we will extend
the existing system call interface to allow extra file descriptors,
and *if* we really need a different type of parameters in the future,
we will add another system call.

If we all agree, I can post a kernel patch for this change as a RFC.
(I've already verified it with my prototype of kexec_file_load support
on arm64.)

Thanks,
-Takahiro AKASHI

> -- 
> []'s
> Thiago Jung Bauermann
> IBM Linux Technology Center
> 

WARNING: multiple messages have this Message-ID (diff)
From: takahiro.akashi@linaro.org (AKASHI Takahiro)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC] arm64: kexec_file_load support
Date: Mon, 11 Jul 2016 16:19:35 +0900	[thread overview]
Message-ID: <20160711071934.GZ20774@linaro.org> (raw)
In-Reply-To: <11139482.zLvCKVycQr@hactar>

On Fri, Jul 08, 2016 at 11:48:44AM -0300, Thiago Jung Bauermann wrote:
> Am Donnerstag, 07 Juli 2016, 14:12:45 schrieb Dave Young:
> > If so maybe change a bit from your precious mentioned 7 args proposal like
> > below?
> > 
> > struct kexec_file_fd {
> > 	enum kexec_file_type;
> > 	int fd;
> > }
> > 
> > struct kexec_fdset {
> > 	int nr_fd;
> > 	struct kexec_file_fd fd[0];
> > }
> > 
> > int kexec_file_load(int kernel_fd, int initrd_fd,
> > 		    unsigned long cmdline_len, const char *cmdline_ptr,
> > 		    unsigned long flags, struct kexec_fdset *extra_fds);
> 
> 
> Is there a way for the kernel to distinguish whether the process passed 5 or 
> 6 arguments? How can it know whether extra_fds is a valid argument or just 
> garbage? I think we have to define a new flag KEXEC_FILE_EXTRA_FDS so that 
> the process can signal that it is using the new interface.

Good point. What I had in my mind is "open" system call.
Glibc's implementation of open() checks for the second argument, flags,
to determine whether or not the third argument, mode, is required.

So our current consensus is that, for the time being, we will extend
the existing system call interface to allow extra file descriptors,
and *if* we really need a different type of parameters in the future,
we will add another system call.

If we all agree, I can post a kernel patch for this change as a RFC.
(I've already verified it with my prototype of kexec_file_load support
on arm64.)

Thanks,
-Takahiro AKASHI

> -- 
> []'s
> Thiago Jung Bauermann
> IBM Linux Technology Center
> 

WARNING: multiple messages have this Message-ID (diff)
From: AKASHI Takahiro <takahiro.akashi@linaro.org>
To: Thiago Jung Bauermann <bauerman@linux.vnet.ibm.com>
Cc: linux-arm-kernel@lists.infradead.org, bhe@redhat.com,
	kexec@lists.infradead.org, linuxppc-dev@lists.ozlabs.org,
	will.deacon@arm.com, linux-kernel@vger.kernel.org,
	ebiederm@xmission.com, catalin.marinas@arm.com,
	Dave Young <dyoung@redhat.com>,
	vgoyal@redhat.com
Subject: Re: [RFC] arm64: kexec_file_load support
Date: Mon, 11 Jul 2016 16:19:35 +0900	[thread overview]
Message-ID: <20160711071934.GZ20774@linaro.org> (raw)
In-Reply-To: <11139482.zLvCKVycQr@hactar>

On Fri, Jul 08, 2016 at 11:48:44AM -0300, Thiago Jung Bauermann wrote:
> Am Donnerstag, 07 Juli 2016, 14:12:45 schrieb Dave Young:
> > If so maybe change a bit from your precious mentioned 7 args proposal like
> > below?
> > 
> > struct kexec_file_fd {
> > 	enum kexec_file_type;
> > 	int fd;
> > }
> > 
> > struct kexec_fdset {
> > 	int nr_fd;
> > 	struct kexec_file_fd fd[0];
> > }
> > 
> > int kexec_file_load(int kernel_fd, int initrd_fd,
> > 		    unsigned long cmdline_len, const char *cmdline_ptr,
> > 		    unsigned long flags, struct kexec_fdset *extra_fds);
> 
> 
> Is there a way for the kernel to distinguish whether the process passed 5 or 
> 6 arguments? How can it know whether extra_fds is a valid argument or just 
> garbage? I think we have to define a new flag KEXEC_FILE_EXTRA_FDS so that 
> the process can signal that it is using the new interface.

Good point. What I had in my mind is "open" system call.
Glibc's implementation of open() checks for the second argument, flags,
to determine whether or not the third argument, mode, is required.

So our current consensus is that, for the time being, we will extend
the existing system call interface to allow extra file descriptors,
and *if* we really need a different type of parameters in the future,
we will add another system call.

If we all agree, I can post a kernel patch for this change as a RFC.
(I've already verified it with my prototype of kexec_file_load support
on arm64.)

Thanks,
-Takahiro AKASHI

> -- 
> []'s
> Thiago Jung Bauermann
> IBM Linux Technology Center
> 

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

  parent reply	other threads:[~2016-07-11  7:14 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-01  5:11 [RFC] arm64: kexec_file_load support AKASHI Takahiro
2016-07-01  5:11 ` AKASHI Takahiro
2016-07-01  5:11 ` AKASHI Takahiro
2016-07-01 15:46 ` Thiago Jung Bauermann
2016-07-01 15:46   ` Thiago Jung Bauermann
2016-07-01 15:46   ` Thiago Jung Bauermann
2016-07-04  6:58   ` AKASHI Takahiro
2016-07-04  6:58     ` AKASHI Takahiro
2016-07-04  6:58     ` AKASHI Takahiro
2016-07-04 22:50     ` Thiago Jung Bauermann
2016-07-04 22:50       ` Thiago Jung Bauermann
2016-07-04 22:50       ` Thiago Jung Bauermann
2016-07-05  8:07       ` AKASHI Takahiro
2016-07-05  8:07         ` AKASHI Takahiro
2016-07-05  8:07         ` AKASHI Takahiro
2016-07-05  1:25     ` Dave Young
2016-07-05  1:25       ` Dave Young
2016-07-05  1:25       ` Dave Young
2016-07-05  8:03       ` AKASHI Takahiro
2016-07-05  8:03         ` AKASHI Takahiro
2016-07-05  8:03         ` AKASHI Takahiro
2016-07-07  6:12         ` Dave Young
2016-07-07  6:12           ` Dave Young
2016-07-07  6:12           ` Dave Young
2016-07-08 14:48           ` Thiago Jung Bauermann
2016-07-08 14:48             ` Thiago Jung Bauermann
2016-07-08 14:48             ` Thiago Jung Bauermann
2016-07-11  3:10             ` Dave Young
2016-07-11  3:10               ` Dave Young
2016-07-11  3:10               ` Dave Young
2016-07-11  7:19             ` AKASHI Takahiro [this message]
2016-07-11  7:19               ` AKASHI Takahiro
2016-07-11  7:19               ` AKASHI Takahiro
2016-07-11  8:14               ` Dave Young
2016-07-11  8:14                 ` Dave Young
2016-07-11  8:14                 ` Dave Young

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160711071934.GZ20774@linaro.org \
    --to=takahiro.akashi@linaro.org \
    --cc=bauerman@linux.vnet.ibm.com \
    --cc=bhe@redhat.com \
    --cc=catalin.marinas@arm.com \
    --cc=dyoung@redhat.com \
    --cc=ebiederm@xmission.com \
    --cc=kexec@lists.infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=vgoyal@redhat.com \
    --cc=will.deacon@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.