Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp552386pxb; Tue, 3 Nov 2020 06:37:31 -0800 (PST) X-Google-Smtp-Source: ABdhPJy+XADlo9RTTJELXl7W3jGK7s/XQqzJgQmwfPPAScJ5YO2FqsgnX5zKRxse00oy+SmdR9nc X-Received: by 2002:a17:906:3582:: with SMTP id o2mr19987259ejb.518.1604414251159; Tue, 03 Nov 2020 06:37:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604414251; cv=none; d=google.com; s=arc-20160816; b=zEP6lPSiTE3AS+ta66SVjvcE+72bOv2VRaRloPAG3SzqM6+Ry6vCdaDtSJmtpjBViq SRExdohzWMbx48VjeyJVBLWrTRjuZ+3lc9Asn1Zg6LDkUStajamSM2YjRO97KYlMeTUg cs5XfAJ3KPXlUxE9J69EIvEig0QcSiMaJQGrI9RKi5MkZd5VivaYhtCau9at4FnCesS8 Ew2JLCVUzQXneGEblCtfnDdO/j8rP5ee+bc12YGW/NM8LoZfpv+8/ueXu1E9vCIo9Lzr 3LKiWWjUcXDF+xD3sZLAZjpXuqGUojqMp0qMt06Ea/kGioT3pBVb+hok24o2IiWk5ieV dwlg== 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=PCRJp91/82MIer7BGmfwt2GKdylAg2x5Gxk5MeSJA78=; b=n633ZoCdUTHZBcj3gu8A4koLhJl9VVGVtXDF47GOkU8jlbCf6h7fO1+6I8F3VGTD7k BV5TFD4HN6Ocb7B6TcfSEN+ogVKOfW/yYLKlT6xcxc3A22r05WkF4MnYEBurjQd/VzV5 LAQLnth5Q/9hbwpLj3qAl33zRE3vDTkFRnqTqKeHSHHlEMOuIrxm8PhlqDz8iVJ8HDye 22H92xHpi3/87FhsuOtXD/4twd5+irapy8Rt7gSWI0TE0P09l/9PljPdxeYGwfw9/Uqy P/9i4T6X2/yMEGaiA2dN9+Gx7a5JHoqISn/wkKVPmciDykBbVsoSI/UF3i4IrH9kiIeY B1sw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=l1UUt3QN; 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 x3si9549405eds.522.2020.11.03.06.37.08; Tue, 03 Nov 2020 06:37:31 -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=l1UUt3QN; 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 S1729683AbgKCOUw (ORCPT + 99 others); Tue, 3 Nov 2020 09:20:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40278 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729231AbgKCNpN (ORCPT ); Tue, 3 Nov 2020 08:45:13 -0500 Received: from mail-qk1-x741.google.com (mail-qk1-x741.google.com [IPv6:2607:f8b0:4864:20::741]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D327CC0613D1; Tue, 3 Nov 2020 05:45:12 -0800 (PST) Received: by mail-qk1-x741.google.com with SMTP id s14so14576210qkg.11; Tue, 03 Nov 2020 05:45:12 -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=PCRJp91/82MIer7BGmfwt2GKdylAg2x5Gxk5MeSJA78=; b=l1UUt3QNH+lFGhcDNXPtNMRtkqffL4tl2O3N54zCmMcpor3j0kMgvLUkphpicH1DmA e9gal6RMIMfV24ZCzIyXif3axp17c+gJqxlt5Z8rdoWW187/XRB5yRLtrmSF3fnFNRa5 Gz4l7hh+A/kcwK1wh/9J1YbL45kF8pUgj+gZr8qTNoaduXm4U4vFw5nLxuqYxEhO9TH3 1FHIRwqPxk86OlrRsKwElUT5rJ7lTXmfKiLIj6+R7Jj+iIsstunlj+07tab+NwEeiDOI amlsHmXjmNf1MAZl7gdBl94TpeXtOXHhLIlLKkgT/Dq+j3UvNDfH9rBNln7RpPwBLiU5 Oklg== 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=PCRJp91/82MIer7BGmfwt2GKdylAg2x5Gxk5MeSJA78=; b=HMuVukLKI/7ODekYG3Z1YNQlRD7nqcKcP81fMAGRIXi2kdDx5Z3W1EErYFpp6CLSeP 1muNrsB2Hweudf+bnM2yMg+PQmuuW0iMn67YTIKddRjYs3U9pey3sLbb8wc6aWOtIlGe Piu2/mWCqrUPs7RZOQuv4LfgyHaxoP748wzspEJdNZuq4rVg9HnlFKBXVMKn7uIIVvUN 9CCIxyXKSu7r45hHmNaqRWG7ZmsJGQl3nVXacjxOAFbrmMgnA/9cFM4EEjhJGbZT4S3p WawaoVBnqUS6cZMQbz4Tc+OS0F/6HEZKAAQTnOeTgAc4wgckSXydI1jVRRy/ahQUZUx+ /3wg== X-Gm-Message-State: AOAM532EcUmB+qbHj4lWP4dHM4/H5OxCO6vT8c5nTfDeB/Y9rfsW9M+M ZUTjG22rQ+v1JYoOCTaqvxo= X-Received: by 2002:a37:5002:: with SMTP id e2mr19533167qkb.453.1604411112117; Tue, 03 Nov 2020 05:45:12 -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.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Nov 2020 05:45:11 -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 3/8] powerpc: Enable seccomp architecture tracking Date: Tue, 3 Nov 2020 07:42:59 -0600 Message-Id: <4ec2970fcc819eb4d5dac2bd35233ccdadfda845.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 powerpc. Signed-off-by: YiFei Zhu --- arch/powerpc/include/asm/seccomp.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/arch/powerpc/include/asm/seccomp.h b/arch/powerpc/include/asm/seccomp.h index 51209f6071c5..3efcc83e9cc6 100644 --- a/arch/powerpc/include/asm/seccomp.h +++ b/arch/powerpc/include/asm/seccomp.h @@ -8,4 +8,25 @@ #include +#ifdef __LITTLE_ENDIAN__ +#define __SECCOMP_ARCH_LE_BIT __AUDIT_ARCH_LE +#else +#define __SECCOMP_ARCH_LE_BIT 0 +#endif + +#ifdef CONFIG_PPC64 +# define SECCOMP_ARCH_NATIVE (AUDIT_ARCH_PPC64 | __SECCOMP_ARCH_LE) +# define SECCOMP_ARCH_NATIVE_NR NR_syscalls +# define SECCOMP_ARCH_NATIVE_NAME "ppc64" +# ifdef CONFIG_COMPAT +# define SECCOMP_ARCH_COMPAT (AUDIT_ARCH_PPC | __SECCOMP_ARCH_LE) +# define SECCOMP_ARCH_COMPAT_NR NR_syscalls +# define SECCOMP_ARCH_COMPAT_NAME "powerpc" +# endif +#else /* !CONFIG_PPC64 */ +# define SECCOMP_ARCH_NATIVE (AUDIT_ARCH_PPC | __SECCOMP_ARCH_LE) +# define SECCOMP_ARCH_NATIVE_NR NR_syscalls +# define SECCOMP_ARCH_NATIVE_NAME "powerpc" +#endif + #endif /* _ASM_POWERPC_SECCOMP_H */ -- 2.29.2