Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,URIBL_BLOCKED,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 506ABC43387 for ; Mon, 7 Jan 2019 18:25:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1D8872087F for ; Mon, 7 Jan 2019 18:25:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727153AbfAGSZU (ORCPT ); Mon, 7 Jan 2019 13:25:20 -0500 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:37454 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727001AbfAGSZU (ORCPT ); Mon, 7 Jan 2019 13:25:20 -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 284F880D; Mon, 7 Jan 2019 10:25:20 -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 373A43F5A0; Mon, 7 Jan 2019 10:25:19 -0800 (PST) Date: Mon, 7 Jan 2019 18:25:16 +0000 From: Will Deacon To: gregkh@linuxfoundation.org Cc: Dave.Martin@arm.com, pihsun@chromium.org, stable@vger.kernel.org Subject: Re: FAILED: patch "[PATCH] arm64: compat: Avoid sending SIGILL for unallocated syscall" failed to apply to 4.14-stable tree Message-ID: <20190107182516.GC22911@fuggles.cambridge.arm.com> References: <154685398156120@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <154685398156120@kroah.com> User-Agent: Mutt/1.11.1+86 (6f28e57d73f2) () Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org On Mon, Jan 07, 2019 at 10:39:41AM +0100, gregkh@linuxfoundation.org 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 . > > thanks, > > greg k-h > > ------------------ original commit in Linus's tree ------------------ > > From 169113ece0f29ebe884a6cfcf57c1ace04d8a36a Mon Sep 17 00:00:00 2001 > From: Will Deacon > 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