On Mon, Jan 07, 2019 at 10:39:41AM +0100, gregkh@xxxxxxxxxxxxxxxxxxx wrote: > > The patch below does not apply to the 4.14-stable tree. > If someone wants it applied there, or to any other stable or longterm > tree, then please email the backport, including the original git commit > id to <stable@xxxxxxxxxxxxxxx>. > > thanks, > > greg k-h > > ------------------ original commit in Linus's tree ------------------ > > From 169113ece0f29ebe884a6cfcf57c1ace04d8a36a Mon Sep 17 00:00:00 2001 > From: Will Deacon <will.deacon@xxxxxxx> > Date: Thu, 3 Jan 2019 17:45:07 +0000 > Subject: [PATCH] arm64: compat: Avoid sending SIGILL for unallocated syscall > numbers > > The ARM Linux kernel handles the EABI syscall numbers as follows: > > 0 - NR_SYSCALLS-1 : Invoke syscall via syscall table > NR_SYSCALLS - 0xeffff : -ENOSYS (to be allocated in future) > 0xf0000 - 0xf07ff : Private syscall or -ENOSYS if not allocated > > 0xf07ff : SIGILL > > Our compat code gets this wrong and ends up sending SIGILL in response > to all syscalls greater than NR_SYSCALLS which have a value greater > than 0x7ff in the bottom 16 bits. > > Fix this by defining the end of the ARM private syscall region and > checking the syscall number against that directly. Update the comment > while we're at it. Aha, looks like 532826f3712b ("arm64: Mirror arm for unimplemented compat syscalls") wasn't CC'd for stable so the breakage it caused didn't propagate to 4.14 or earlier. I'll send a rebased version of the other patch in this series for 4.19 stable separately. Will