From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757656AbcGKDKy (ORCPT ); Sun, 10 Jul 2016 23:10:54 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40485 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757641AbcGKDKv (ORCPT ); Sun, 10 Jul 2016 23:10:51 -0400 Date: Mon, 11 Jul 2016 11:10:44 +0800 From: Dave Young To: Thiago Jung Bauermann Cc: AKASHI Takahiro , 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 Message-ID: <20160711031044.GA2850@dhcp-128-65.nay.redhat.com> References: <20160701051111.GL20774@linaro.org> <20160705080355.GQ20774@linaro.org> <20160707061245.GA18459@dhcp-128-65.nay.redhat.com> <11139482.zLvCKVycQr@hactar> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <11139482.zLvCKVycQr@hactar> User-Agent: Mutt/1.5.24 (2015-08-30) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Mon, 11 Jul 2016 03:10:51 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 07/08/16 at 11:48am, 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. Agreed, a new flag is needed. Thanks Dave