From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754881AbcGHOtd (ORCPT ); Fri, 8 Jul 2016 10:49:33 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:55286 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755773AbcGHOsz (ORCPT ); Fri, 8 Jul 2016 10:48:55 -0400 X-IBM-Helo: d24dlp01.br.ibm.com X-IBM-MailFrom: bauerman@linux.vnet.ibm.com X-IBM-RcptTo: linux-kernel@vger.kernel.org From: Thiago Jung Bauermann To: Dave Young 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 Date: Fri, 08 Jul 2016 11:48:44 -0300 User-Agent: KMail/4.14.3 (Linux/3.13.0-91-generic; KDE/4.14.13; x86_64; ; ) In-Reply-To: <20160707061245.GA18459@dhcp-128-65.nay.redhat.com> References: <20160701051111.GL20774@linaro.org> <20160705080355.GQ20774@linaro.org> <20160707061245.GA18459@dhcp-128-65.nay.redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16070814-0020-0000-0000-0000021EB343 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 16070814-0021-0000-0000-00002FFB4AE2 Message-Id: <11139482.zLvCKVycQr@hactar> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-07-08_08:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1604210000 definitions=main-1607080138 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. -- []'s Thiago Jung Bauermann IBM Linux Technology Center