Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp369617pxb; Wed, 11 Nov 2020 05:56:24 -0800 (PST) X-Google-Smtp-Source: ABdhPJx98EBhI51wQ3qaHMf8MRtJ2fpfJAOXlsj9PAwDsp7rNjNJ2rBN6GDb7omlUsLv9Xw+x7i3 X-Received: by 2002:a17:907:411b:: with SMTP id nw19mr24532560ejb.150.1605102984177; Wed, 11 Nov 2020 05:56:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605102984; cv=none; d=google.com; s=arc-20160816; b=iCGaWm6Mp6Wdr2CJuanxa/xIlvrUbPhWIp49y9Hu3oqiIDIEhHGaAM6xCCfv9Qm9HT IrHY+FIhCLCwDjFaUTnBXRRGoKT97nVqZ1R1sJTXulsSZkXPYy/x6Nl3+SNGPEKoxU50 l1J9EiXw520Ea708/G2vEmc47YqhnW9bvgmvaMtJl1DzPEtp6ZomBbb7bU+BJz2alZJj T1GN1gUmUGTaEooUrGAxaol1hAaPRrznuDGnIIR/fkn0TGWof5TlLZRov8gi2iVsLV8J Ll8YXF72uw3ooXbONEQJo3KGHTR2sK8vZ4o2h+pkdgR3WWTb+ow1QSRWE4Ix6MEGhAfA nKlw== 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=Z8BEo0x7DBxygVu3ezyut+Q+/5lHQFyLMFsea6yH4dY=; b=clsMPR3q4jtS+ZGWX/qIoKVNRlFo3zjwf08/EGyruAK8iPiBiYIbN3l9L3ua/Asn0a 0g6+fcB2wlNUKQiABrJ5hfDQzQp2BoHdkQPxu1agXzsPQC0Ag2I45QRVsZoi3usxuiW9 2r20ye2H+GKD1znQ0+ivkfI5hZNCVRbESNcdTFAzBAIjM+DMEKT4PbTGSpmkiUEW5GQ3 1hBlLufs9/QiaGzXnPuSs9+zvXb6bJQHyIfzQDn6uUfhEW8a8eddhkub2DNs4rtS55L6 nj07NpbwbjzJiF/gy6FkR+f+DEHSBgceoBQNTM1eiFIz6K8w5Rqc/9JsPsySwpSnZpzH OmJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=AiHrWEt1; 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 v11si1292783ejx.648.2020.11.11.05.55.58; Wed, 11 Nov 2020 05:56:24 -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=AiHrWEt1; 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 S1726925AbgKKNfQ (ORCPT + 99 others); Wed, 11 Nov 2020 08:35:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54104 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726534AbgKKNem (ORCPT ); Wed, 11 Nov 2020 08:34:42 -0500 Received: from mail-qt1-x841.google.com (mail-qt1-x841.google.com [IPv6:2607:f8b0:4864:20::841]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 71384C0613D1; Wed, 11 Nov 2020 05:34:42 -0800 (PST) Received: by mail-qt1-x841.google.com with SMTP id i12so1261440qtj.0; Wed, 11 Nov 2020 05:34:42 -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=Z8BEo0x7DBxygVu3ezyut+Q+/5lHQFyLMFsea6yH4dY=; b=AiHrWEt19R14SjvDJPKLr7v7i72FmAs7tKIcKGMSWFQwQ/DIoBrkASCkncBIALbImW ovXjCz0vPL0IwyG05D0ScobV3buaYwTntzRWG4DvErPgobGS3lP6aF57Y5z/ROppbM15 U5alV4hGDTuqamCbUCRSnEElgLlyHQqyfApA9IFdiByMiEgJ9T5aChZZ8FuOLffq7taE 8RCryXNGD6+QzxN4QWCFwCmheQXdMAr5LaXXLZuZJoit1BPXhkYBBltSg8ODItIgxHp4 ULkURkvuGrMOziExOLhaMa/N/5bMiNtXHKjvWx5fTW5xKcw7pTxjO4xz/fvpWPD8dS5Q jWQg== 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=Z8BEo0x7DBxygVu3ezyut+Q+/5lHQFyLMFsea6yH4dY=; b=B9G166sWDSpp4jE6qoPX2pQXGCyQuB2kCAdweMbszXFTdI4MGQTuW3doFDTB1Gx4xQ iQv6T69xGN1y1MX5s4oySAR2wLt0A0vgnqkg15k2V9307IOGY1NMwB7dFVFCuucZgHkP CO27SbhROxy4n/klh/EvY5AFR2yyX8D85sVIfgmeCV97kxIH9CFB699hjOYHxEtIHLuQ MCoiUhcakmQ8bOAPFcj8gPucUeW9nISWk32ifndiaAlYMc4mkQ8zQAh1UlxW/1UMfAHu ghL0OwHBvWB34K5dfVOoiJw3s2+2xzti9+AwwgOTbjjXwff0N2zAGVwQuN+dLDfp2J6T ADRQ== X-Gm-Message-State: AOAM530aDNwEwe1IJEJOKGDnICWanLNf+/UMR/2JVmSKbFz3BqHS+ntD HNhCQnhHp1Qpm1atvMCfdGk= X-Received: by 2002:aed:2744:: with SMTP id n62mr24170273qtd.67.1605101681720; Wed, 11 Nov 2020 05:34:41 -0800 (PST) Received: from localhost.localdomain (host-173-230-99-154.tnkngak.clients.pavlovmedia.com. [173.230.99.154]) by smtp.gmail.com with ESMTPSA id r190sm1997814qkf.101.2020.11.11.05.34.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Nov 2020 05:34:41 -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 v2 6/8] sh: Enable seccomp architecture tracking Date: Wed, 11 Nov 2020 07:33:52 -0600 Message-Id: <61ae084cd4783b9b50860d9dedb4a348cf1b7b6f.1605101222.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..d4578395fd66 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 __AUDIT_ARCH_LE +#else +#define __SECCOMP_ARCH_LE 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