Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2124876imu; Thu, 10 Jan 2019 08:40:42 -0800 (PST) X-Google-Smtp-Source: ALg8bN4dgEkbJMS+nTwRdGYtuCX7gBA9WBi9tpbP/p7L3pYL/sdLHdV6auErBbkIzwnBZ7in7LsQ X-Received: by 2002:a17:902:8c91:: with SMTP id t17mr10661001plo.119.1547138442386; Thu, 10 Jan 2019 08:40:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547138442; cv=none; d=google.com; s=arc-20160816; b=vr28rqC06ggBlNwcioaFtMRpgpTVqSqLxoZIuS/Hz5UwGYVfUJCHFfZW+e7er5WM91 7pofwAnRcK1V0x+KNtVmAEercBuJn1q2lhP5X0JAlS7l3z+dgcY+FbqiuGDtTTmP6wfH DdKSzYIwDV2xcFrqeyZd5Zd0CUwgJoLSWZ6te8312q8LUDLBsz6YkSmU8ZSl8s86F61w sJFazmgLcE/IVSpiJey68ex3UHD1WWw28YR1CMlyyQdQNL6ttmaoupxf08lI45LAzYUM osORyNvb+IQeEUaoqjbxM3G5a/2VNaiM5ewhcQ4pgJ/OV4Uw06Ud+A7GbVPtJyLFpQdJ 1qSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=QnrlqGozXT8tTOlFYn0XGYmI4fkgFNvdvyRZ6Hj2wCI=; b=uORZ5TnFzltRaVzNAXN0SeyBV1vVf6ZBtZiu6NJTFrYcC7dM+2c08YK/lh1YQbKAA4 D8cxjVMI+N8FTuVFE35+yfSRuWYkex28fvU49NrB54ZvqwlkGDaE9MpcIcpwV3d1KuSF KSIQxUokNedBaubOQYSBg+Fyh9T3yAWAXEuJ/BOJJD7ubADBhMpC0oi40KWKLEOQhvnO yeVtA/uU0gIf4CS431JAoKKKPmS4QGLYsNuOe4zk9+B/goquhvFmftsJXF2721r08V/b nbxoLLHg5h68ysMSBfufl51jVpGF8tH7pUg2LrjqRl/g0kISJfP/gFGAMYQbjeXAZ/P6 whzQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t9si6779756pfk.35.2019.01.10.08.40.26; Thu, 10 Jan 2019 08:40:42 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728266AbfAJQjT (ORCPT + 99 others); Thu, 10 Jan 2019 11:39:19 -0500 Received: from foss.arm.com ([217.140.101.70]:39558 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727836AbfAJQjS (ORCPT ); Thu, 10 Jan 2019 11:39:18 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 6E5D5A78; Thu, 10 Jan 2019 08:39:17 -0800 (PST) Received: from fuggles.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 27BBF3F694; Thu, 10 Jan 2019 08:39:11 -0800 (PST) Date: Thu, 10 Jan 2019 16:39:08 +0000 From: Will Deacon To: Arnd Bergmann Cc: y2038@lists.linaro.org, linux-api@vger.kernel.org, linux-kernel@vger.kernel.org, ink@jurassic.park.msu.ru, mattst88@gmail.com, linux@armlinux.org.uk, catalin.marinas@arm.com, tony.luck@intel.com, fenghua.yu@intel.com, geert@linux-m68k.org, monstr@monstr.eu, paul.burton@mips.com, deller@gmx.de, mpe@ellerman.id.au, schwidefsky@de.ibm.com, heiko.carstens@de.ibm.com, dalias@libc.org, davem@davemloft.net, luto@kernel.org, tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com, x86@kernel.org, jcmvbkbc@gmail.com, firoz.khan@linaro.org, ebiederm@xmission.com, deepa.kernel@gmail.com, linux@dominikbrodowski.net, akpm@linux-foundation.org, dave@stgolabs.net, linux-alpha@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-ia64@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-mips@vger.kernel.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org Subject: Re: [PATCH 07/15] ARM: add kexec_file_load system call number Message-ID: <20190110163908.GC31683@fuggles.cambridge.arm.com> References: <20190110162435.309262-1-arnd@arndb.de> <20190110162435.309262-8-arnd@arndb.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190110162435.309262-8-arnd@arndb.de> User-Agent: Mutt/1.11.1+86 (6f28e57d73f2) () Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 10, 2019 at 05:24:27PM +0100, Arnd Bergmann wrote: > A couple of architectures including arm64 already implement the > kexec_file_load system call, on many others we have assigned a system > call number for it, but not implemented it yet. > > Adding the number in arch/arm/ lets us use the system call on arm64 > systems in compat mode, and also reduces the number of differences > between architectures. If we want to implement kexec_file_load on ARM > in the future, the number assignment means that kexec tools can already > be built with the now current set of kernel headers. > > Signed-off-by: Arnd Bergmann > --- > arch/arm/tools/syscall.tbl | 1 + > arch/arm64/include/asm/unistd.h | 2 +- > arch/arm64/include/asm/unistd32.h | 2 ++ > 3 files changed, 4 insertions(+), 1 deletion(-) > > diff --git a/arch/arm/tools/syscall.tbl b/arch/arm/tools/syscall.tbl > index 86de9eb34296..20ed7e026723 100644 > --- a/arch/arm/tools/syscall.tbl > +++ b/arch/arm/tools/syscall.tbl > @@ -415,3 +415,4 @@ > 398 common rseq sys_rseq > 399 common io_pgetevents sys_io_pgetevents > 400 common migrate_pages sys_migrate_pages > +401 common kexec_file_load sys_kexec_file_load > diff --git a/arch/arm64/include/asm/unistd.h b/arch/arm64/include/asm/unistd.h > index 261216c3336e..2c30e6f145ff 100644 > --- a/arch/arm64/include/asm/unistd.h > +++ b/arch/arm64/include/asm/unistd.h > @@ -44,7 +44,7 @@ > #define __ARM_NR_compat_set_tls (__ARM_NR_COMPAT_BASE + 5) > #define __ARM_NR_COMPAT_END (__ARM_NR_COMPAT_BASE + 0x800) > > -#define __NR_compat_syscalls 401 > +#define __NR_compat_syscalls 402 > #endif > > #define __ARCH_WANT_SYS_CLONE > diff --git a/arch/arm64/include/asm/unistd32.h b/arch/arm64/include/asm/unistd32.h > index 355fe2bc035b..19f3f58b6146 100644 > --- a/arch/arm64/include/asm/unistd32.h > +++ b/arch/arm64/include/asm/unistd32.h > @@ -823,6 +823,8 @@ __SYSCALL(__NR_rseq, sys_rseq) > __SYSCALL(__NR_io_pgetevents, compat_sys_io_pgetevents) > #define __NR_migrate_pages 400 > __SYSCALL(__NR_migrate_pages, sys_migrate_pages) > +#define __NR_kexec_file_load 401 > +__SYSCALL(__NR_kexec_file_load, sys_kexec_file_load) Hmm, I wonder if we need a compat wrapper for this, or are we assuming that the early entry code has already zero-extended the long and pointer arguments? Will