Re: [PATCH 18/18] arm64: implement syscall wrappers

2018-05-15 Thread Mark Rutland
On Mon, May 14, 2018 at 10:57:44PM +0200, Dominik Brodowski wrote: > On Mon, May 14, 2018 at 10:46:40AM +0100, Mark Rutland wrote: > > Note that we play games with sys_ni_syscall(). It can't be defined with > > SYSCALL_DEFINE0() because we must avoid the possibility of error > > injection. Addition

Re: [PATCH 18/18] arm64: implement syscall wrappers

2018-05-14 Thread Dominik Brodowski
On Mon, May 14, 2018 at 10:46:40AM +0100, Mark Rutland wrote: > Note that we play games with sys_ni_syscall(). It can't be defined with > SYSCALL_DEFINE0() because we must avoid the possibility of error > injection. Additionally, there are a couple of locations where we need > to call it from C cod

[PATCH 18/18] arm64: implement syscall wrappers

2018-05-14 Thread Mark Rutland
To minimize the risk of userspace-controlled values being used under speculation, this patch adds pt_regs based syscall wrappers for arm64, which pass the minimum set of required userspace values to syscall implementations. For each syscall, a wrapper which takes a pt_regs argument is automatically