From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:44464 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932752AbeGJKiV (ORCPT ); Tue, 10 Jul 2018 06:38:21 -0400 Date: Tue, 10 Jul 2018 11:39:02 +0100 From: Will Deacon To: Mark Rutland Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, catalin.marinas@arm.com, dave.martin@arm.com, hch@infradead.org, james.morse@arm.com, linux@dominikbrodowski.net, linux-fsdevel@vger.kernel.org, marc.zyngier@arm.com, viro@zeniv.linux.org.uk Subject: Re: [PATCHv4 00/19] arm64: invoke syscalls with pt_regs Message-ID: <20180710103901.GA31318@arm.com> References: <20180702110415.10465-1-mark.rutland@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180702110415.10465-1-mark.rutland@arm.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Mon, Jul 02, 2018 at 12:03:56PM +0100, Mark Rutland wrote: > This series reworks arm64's syscall handling to minimize the propagation > of user-controlled register values into speculated code paths. As with > x86 [1], a wrapper is generated for each syscall, which extracts the > argument from a struct pt_regs. During kernel entry from userspace, > registers are zeroed. > > The arm64 kernel code directly invokes some syscalls which the x86 code > doesn't, so I've added ksys_* wrappers for these, following the x86 > example. The rest of the series is arm64-specific. > > I've pushed the series out to my arm64/syscall-regs branch [2] on > kernel.org. One thing I noticed with this series applied is that our sys_call_table declarations all get a bit muddled: arm64/kernel/sys.c: void * const sys_call_table[] arm64/kernel/sys32.c: void * const compat_sys_call_table[] arm64/kernel/syscall.c: extern syscall_fn_t sys_call_table[]; extern syscall_fn_t compat_sys_call_table[]; arm64/include/asm/syscall.h: extern const void *sys_call_table[]; Can we tidy this up so that syscall.h provides a declaration using syscall_fn_t, allowing us to drop the additional externs? Will