Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp549783imu; Thu, 3 Jan 2019 02:52:56 -0800 (PST) X-Google-Smtp-Source: ALg8bN7qmuuzNd34C1T6jxxPhhldMyu+4z4dc+WsL9YwNW40HxEK2gT8vv3dSYlKt/Kyr9rUJnjl X-Received: by 2002:a17:902:4464:: with SMTP id k91mr47130492pld.13.1546512776028; Thu, 03 Jan 2019 02:52:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546512776; cv=none; d=google.com; s=arc-20160816; b=m73nuWYxF6IUIJbi0sAkh7/iwJ0GAMUQ/udlQRD6NFb28CfSiyTepJI4SoJ0KdPvsS DDTWj0K+sulNr5+IYywBzRCo53vsTqpidP272twF7zrgVPDcmb2vT7k7S9ary6GMNheM C1GM3K2zF+058K+Py4uhtfQzlwknqYjd8IGVTVVwEOGVWD1biRLs1M5VoQlZ3KkMpbPC J6IajDyJgk2H0P40OqJOnTT5BFRY69lNBmsoMjccBrRre5rxmj6Jo63bivkQBjm3xPdG DemyztTQeyd0JML+K5/VWqQJQHv2/VxhcJx2Rihl5yby6FLI006nYd91g1PqRLbfUbKx SvwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:content-transfer-encoding:mime-version :message-id:date:subject:cc:from:dkim-signature; bh=XZyVPDcuIHzUbEPySa+rOarYwWqnomdmWUj5ysGa47Y=; b=miU85CyLGD5f35N/d8/iqe4qyXKIAYorOq+qDOxEwTGND9AaLFWOAcrVAAuKYBhF8f eeNlkMWg8UVU4q2DTgVZRpIIoXcHOG1OSjKtEpe5F+kjtlQkBFxtBXQfnpJfP2mh7U6H mtq5zx67Uvac9fpXaW92emx8jZ206mcTGcFUEPYf3tTkSSOJjfz9rmZ4Xy/erqXcgWuG SeyD9bXdDp5sg/mFuw91dZjleuXdWntpjF09HU+Ks3X3+p30TFXvAsAmmnqiNsymeA9Z sfUIlMHqAsv2crTrr+Pm/3o/yi+PDQoK7+3TS1loMw6y4JjyQZGOhtqRttCeCs3HGXy2 tTDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@chromium.org header.s=google header.b="fPC/Ugby"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b2si52854822pgh.475.2019.01.03.02.52.37; Thu, 03 Jan 2019 02:52:55 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@chromium.org header.s=google header.b="fPC/Ugby"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730295AbfACHqT (ORCPT + 99 others); Thu, 3 Jan 2019 02:46:19 -0500 Received: from mail-pl1-f193.google.com ([209.85.214.193]:40902 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730219AbfACHqS (ORCPT ); Thu, 3 Jan 2019 02:46:18 -0500 Received: by mail-pl1-f193.google.com with SMTP id u18so15561184plq.7 for ; Wed, 02 Jan 2019 23:46:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=XZyVPDcuIHzUbEPySa+rOarYwWqnomdmWUj5ysGa47Y=; b=fPC/UgbyuvbCL/hAZlFV1Ol29Fut22cOieFeUzWZrmgm5KjQsIzj4KBNDKHdeeFZkY 56Voxg+Rj8irow1ZTOemIC7faMEb6RhR6Usxd5aE+KsC0Ag7LKGyL4KyLNuOXPZPxlrI PfJJdy6povcMowQwG5ydj3HwdJxzipbWSR3uk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=XZyVPDcuIHzUbEPySa+rOarYwWqnomdmWUj5ysGa47Y=; b=GEb/BEj2q3Xbn7b4F2xO4I9pugbDhurcUhuk38vHC3bPMJcsyyZell4vDpZFbonNiu gqXUtnrjNogZDdQUvXPdZ2B05seuGCpDs7OpbTuYnrZvjhYlQdxhlWcEsSjdLge1NXyT u7kKavYOSTDs+O0orB9FsKyJGsPrD/XE59s+HJxBdAZd6o02XSRENNpP11SIsWNvDF4p eHVd1hDkeIQ7KWAGdTmRxDjWFRF7S3g+Q2d/CvWzV8Q0IN0VZQJDPdBWkiUXGX5Fmm2Q vkYlNSePZ3XvU912drSiXOJeXxOPDrQwRCfIcprlKdVhR/vuFiqP6pPO07JrPb2KcwRB cwpw== X-Gm-Message-State: AJcUukdkO/mPvZZjigAZ0u9WBBmg+8r3iMdKVys+hUGG1ZgvHscUZm13 zh2HwUMpYKSBqu6+OB3u64GnOQ== X-Received: by 2002:a17:902:9045:: with SMTP id w5mr44213463plz.32.1546501577642; Wed, 02 Jan 2019 23:46:17 -0800 (PST) Received: from pihsun-z840.tpe.corp.google.com ([2401:fa00:1:10:7889:7a43:f899:134c]) by smtp.googlemail.com with ESMTPSA id t5sm82569539pfb.60.2019.01.02.23.46.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 02 Jan 2019 23:46:16 -0800 (PST) From: Pi-Hsun Shih Cc: Pi-Hsun Shih , Catalin Marinas , Will Deacon , Mark Rutland , Dominik Brodowski , Dave Martin , linux-arm-kernel@lists.infradead.org (moderated list:ARM64 PORT (AARCH64 ARCHITECTURE)), linux-kernel@vger.kernel.org (open list) Subject: [PATCH] arm64: Mirror arm for small unimplemented compat syscalls Date: Thu, 3 Jan 2019 15:45:47 +0800 Message-Id: <20190103074550.217421-1-pihsun@chromium.org> X-Mailer: git-send-email 2.20.1.415.g653613c723-goog MIME-Version: 1.0 Content-Transfer-Encoding: 8bit To: unlisted-recipients:; (no To-header on input) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org For syscall number smaller than 0xf0000, arm calls sys_ni_syscall instead of arm_syscall in arch/arm/kernel/entry-common.S, which returns -ENOSYS instead of raising SIGILL. Mirror this behavior for compat syscalls in arm64. Fixes: 532826f3712b607 ("arm64: Mirror arm for unimplemented compat syscalls") Signed-off-by: Pi-Hsun Shih --- arch/arm64/kernel/syscall.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/kernel/syscall.c b/arch/arm64/kernel/syscall.c index 8f3371415642ad..95fd8c7ec8a171 100644 --- a/arch/arm64/kernel/syscall.c +++ b/arch/arm64/kernel/syscall.c @@ -21,7 +21,7 @@ asmlinkage long do_ni_syscall(struct pt_regs *regs) { #ifdef CONFIG_COMPAT long ret; - if (is_compat_task()) { + if (is_compat_task() && regs->regs[7] >= __ARM_NR_COMPAT_BASE) { ret = compat_arm_syscall(regs); if (ret != -ENOSYS) return ret; -- 2.20.1.415.g653613c723-goog