Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp522637pxb; Tue, 3 Nov 2020 05:56:25 -0800 (PST) X-Google-Smtp-Source: ABdhPJxM/y/m9POG6E5FrZNl8ktXsTZkSotXXYHs3p4lWVuo1HqgWIL06zg+GG96HfxjtVbFAzV7 X-Received: by 2002:a17:906:4698:: with SMTP id a24mr15538510ejr.90.1604411785574; Tue, 03 Nov 2020 05:56:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604411785; cv=none; d=google.com; s=arc-20160816; b=EUSGvTn0yjVtK8/y8jOkCsIJufCPP2S2Mm+WbQ1+2YpUblafmPu77kdtsmZKbGwHqK Zeo4fzuoR6ah1aWiaNx+8ery43drBzraV5m+xj6tqURMfEopOj0DMOg3wlI+Abkw9HY6 1YBzOSU8AmrE8DG3csCSWCM/gPwqzsi4wxEYQ4NF6PkTabnOSs6KhMlfpJGUbbMH7mi+ yw6XQsJx44QQlxv7YkQIHqWRHhE5Ap6lyfHJszSgZWGQKL0igVePh+n5o0OAv+ohVGOv ZKkUVxK2Hnsvq6ehEb947HJSWdoptYRaGn7KFUPoLwUE6drlkRj2lm1nCH9qWREeAuJp 5L4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=9/hEAP0td3DKDEonOQx/BrDGR67nDcwn+HdeFH8wdFU=; b=0gTZLkNyEMBMAXVx3jkKKnnWETK3jOXlQxqmvVwEtjSTa7Ls0EmnyEbRQwv4XrhXF3 isa/z2ctFZjHbn5X4ps/+2IaaiGQi4DWjLtiF0wfqxpsw128xRs8C3K9vAtyWxGjE9R2 /YZ67vp0y3Hrg9Y374q8YPYkmVQACnvJHLw8XNT47VCNVO3R0PD5hgvuIOyYxlbbcMhn Hg7VV0+Ra5BY7jkNB6/SsJq08Lf3Qm6WfGql2GmSM9E8PguWkjECr6OWudM0upJ5g27E s66ybJzZ2yDgjt/7hDBNPD5dk9twJz4HBzB0nyskTyVy3GTvgLOA0NvGOpzYClayRw+c DZSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=PMy31dQJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cd21si9820696ejb.85.2020.11.03.05.56.02; Tue, 03 Nov 2020 05:56:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=PMy31dQJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729378AbgKCNqx (ORCPT + 99 others); Tue, 3 Nov 2020 08:46:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40294 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729241AbgKCNpS (ORCPT ); Tue, 3 Nov 2020 08:45:18 -0500 Received: from mail-qt1-x844.google.com (mail-qt1-x844.google.com [IPv6:2607:f8b0:4864:20::844]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1A38EC0613D1; Tue, 3 Nov 2020 05:45:18 -0800 (PST) Received: by mail-qt1-x844.google.com with SMTP id f93so11553474qtb.10; Tue, 03 Nov 2020 05:45:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=9/hEAP0td3DKDEonOQx/BrDGR67nDcwn+HdeFH8wdFU=; b=PMy31dQJueagbOReuh4TyHKDHnWAkQvYrpAxEIErX4xPuMN4MlNB2tU7IkrAnlx5qR uhiVg0r41UxTv/gr4jsg2Wl8FCoeHTXIjjT8/6kSbvOBLPV4TYfJCrk8J0g2rFJRrlKD 1hx2REJtkovGnmyDSF4OhzIchxZlhVI33gOeYruCrarfFMdqwMbuze+ne7D3usBg1+Vq DnVMU0VjWHDphquu2ZmwzzqKtLL7eO8+3YSpHLjN+/oLDv2OFzem5txt9rfYq8LN1OI+ 2+w6DzMI4hNFhProTsfpRsIxSVaEXoTrzgUyJ2J91ehNlbAFEuRmMAY+8h22ZlecP47B /smQ== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=9/hEAP0td3DKDEonOQx/BrDGR67nDcwn+HdeFH8wdFU=; b=FAOUUw8qgEFsLyntO8HMv17VykQMUfNp0Lo06RXXleJk80dVCX0wyKHf4l2Y/q6nb8 AeaqzWnhimpH3y6g8lMqFWh+UwmM6V+WXstJlv1DDIeZvSnNAgSCwryqhP8Ntr6knMHV OuKB1v5mz0DiAoa8eytYEinPfSjZr/GqwpnXq19VRIvZF7XSRNPyMs+bubf+lS7o1u9z VygetQe6GuvoyZ/MJUkPu/R0eKKxJc8Vbv0Eu76m9NGz1SC7WuARpMJi8ZaQ7XJkrVDv XzboR4LkhS3ZYockGV8p+B55E0LZe2hVO6P1lt81b66Q1yHh3C0iwpWnz7I2bv9aOare 1TVQ== X-Gm-Message-State: AOAM530PXGjSHEPMfnR9aUytKqM6P2ZEGRz/yEUsltJuQyQsrKabs+lT xSUzzLl6k8zpOhd0vhsjhio= X-Received: by 2002:aed:2064:: with SMTP id 91mr19450606qta.383.1604411117345; Tue, 03 Nov 2020 05:45:17 -0800 (PST) Received: from zhuyifei1999-ThinkPad-T480.gw.illinois.edu ([2620:0:e00:400f::31]) by smtp.gmail.com with ESMTPSA id a206sm7356568qkb.64.2020.11.03.05.45.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Nov 2020 05:45:16 -0800 (PST) From: YiFei Zhu To: containers@lists.linux-foundation.org Cc: YiFei Zhu , linux-csky@vger.kernel.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, linux-xtensa@linux-xtensa.org, linux-kernel@vger.kernel.org, Aleksa Sarai , Andrea Arcangeli , Andy Lutomirski , David Laight , Dimitrios Skarlatos , Giuseppe Scrivano , Hubertus Franke , Jack Chen , Jann Horn , Josep Torrellas , Kees Cook , Tianyin Xu , Tobin Feldman-Fitzthum , Tycho Andersen , Valentin Rothberg , Will Drewry Subject: [PATCH seccomp 6/8] sh: Enable seccomp architecture tracking Date: Tue, 3 Nov 2020 07:43:02 -0600 Message-Id: <46d7f8d02bdaadf364a59db2d60f43466227b3af.1604410035.git.yifeifz2@illinois.edu> X-Mailer: git-send-email 2.29.2 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: YiFei Zhu To enable seccomp constant action bitmaps, we need to have a static mapping to the audit architecture and system call table size. Add these for sh. Signed-off-by: YiFei Zhu --- arch/sh/include/asm/seccomp.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/arch/sh/include/asm/seccomp.h b/arch/sh/include/asm/seccomp.h index 54111e4d32b8..b8d169292a34 100644 --- a/arch/sh/include/asm/seccomp.h +++ b/arch/sh/include/asm/seccomp.h @@ -8,4 +8,14 @@ #define __NR_seccomp_exit __NR_exit #define __NR_seccomp_sigreturn __NR_rt_sigreturn +#ifdef CONFIG_CPU_LITTLE_ENDIAN +#define __SECCOMP_ARCH_LE_BIT __AUDIT_ARCH_LE +#else +#define __SECCOMP_ARCH_LE_BIT 0 +#endif + +#define SECCOMP_ARCH_NATIVE (AUDIT_ARCH_SH | __SECCOMP_ARCH_LE) +#define SECCOMP_ARCH_NATIVE_NR NR_syscalls +#define SECCOMP_ARCH_NATIVE_NAME "sh" + #endif /* __ASM_SECCOMP_H */ -- 2.29.2