From patchwork Tue Dec 22 17:16:12 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Will Deacon X-Patchwork-Id: 58949 Delivered-To: patch@linaro.org Received: by 10.112.89.199 with SMTP id bq7csp3366724lbb; Tue, 22 Dec 2015 09:16:55 -0800 (PST) X-Received: by 10.98.16.220 with SMTP id 89mr11689904pfq.23.1450804600344; Tue, 22 Dec 2015 09:16:40 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w86si28589993pfa.228.2015.12.22.09.16.40; Tue, 22 Dec 2015 09:16:40 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of stable-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 stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754699AbbLVRQj (ORCPT + 2 others); Tue, 22 Dec 2015 12:16:39 -0500 Received: from cam-admin0.cambridge.arm.com ([217.140.96.50]:49908 "EHLO cam-admin0.cambridge.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751370AbbLVRQh (ORCPT ); Tue, 22 Dec 2015 12:16:37 -0500 Received: from edgewater-inn.cambridge.arm.com (edgewater-inn.cambridge.arm.com [10.1.203.29]) by cam-admin0.cambridge.arm.com (8.12.6/8.12.6) with ESMTP id tBMHGBWr025033; Tue, 22 Dec 2015 17:16:11 GMT Received: by edgewater-inn.cambridge.arm.com (Postfix, from userid 1000) id EEED81AE39C8; Tue, 22 Dec 2015 17:16:13 +0000 (GMT) From: Will Deacon To: stable@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, Will Deacon Subject: [PATCH] arm64: fix off-by-one in compat syscall table for syscalls over 382 Date: Tue, 22 Dec 2015 17:16:12 +0000 Message-Id: <1450804573-322-1-git-send-email-will.deacon@arm.com> X-Mailer: git-send-email 2.1.4 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org [fix targetting -stable only, no upstream commit required] In the bad old days, our compat syscall table was a linear array defined in assembly code using a series of .quad directives generated from a preprocessed header file. When I added compat support for memfd_create and getrandom in commit a97a42c47608 ("arm64: compat: wire up memfd_create and getrandom syscalls for aarch32"), I forgot to pad the gap where seccomp was due to go, and so the new syscalls actually ended up being off-by-one in the table for v3.17 and v3.18 (in 3.19 seccomp was added and in v4.0 we moved the table construction into C). This patch is intended for -stable trees based on v3.17 or v3.18. Cc: # 3.17 and 3.18 only Fixes: a97a42c47608 ("arm64: compat: wire up memfd_create and getrandom syscalls for aarch32") Reported-by: Edmund Grimley-Evans Signed-off-by: Will Deacon --- arch/arm64/include/asm/unistd32.h | 1 + 1 file changed, 1 insertion(+) -- 2.1.4 -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/arm64/include/asm/unistd32.h b/arch/arm64/include/asm/unistd32.h index 9dfdac4a74a1..fbe1ab059bbb 100644 --- a/arch/arm64/include/asm/unistd32.h +++ b/arch/arm64/include/asm/unistd32.h @@ -788,6 +788,7 @@ __SYSCALL(__NR_sched_getattr, sys_sched_getattr) #define __NR_renameat2 382 __SYSCALL(__NR_renameat2, sys_renameat2) /* 383 for seccomp */ +__SYSCALL(383, sys_ni_syscall) #define __NR_getrandom 384 __SYSCALL(__NR_getrandom, sys_getrandom) #define __NR_memfd_create 385