Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp561957pxb; Tue, 3 Nov 2020 06:52:31 -0800 (PST) X-Google-Smtp-Source: ABdhPJwNFK/HySdYBeynhatz+SXrIYnrUlZVmsQTfgJy7/XHhchMDCbC6UVuGsvyZhgr1+WPMrty X-Received: by 2002:a17:906:1e04:: with SMTP id g4mr20009587ejj.72.1604415150976; Tue, 03 Nov 2020 06:52:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604415150; cv=none; d=google.com; s=arc-20160816; b=VG4OErSBKIxUh5hiyBJgRDx+raAzV8V9KC3FXLzCdpNrNYiQvqT+r+A1HWuZLZD1FD NZXhsYWG3a4QzgczuWbEYMzHtcA+wGFdYgS9hwvk1xfebHrVzQcVdrdIt+xhMfSVpJ0r AkznlMTEstAmHwHxkksfYgw3jQ4PW8lik0JKVN3vn3tC7L5BIbAiL62kMzdxRqmohCbu MvS3xmJrZUK5g9o8JTiQx2AjpNXNMvNOb4PfC/fBiJVPO67m9Oz5gMO1oUImT8L0IjIU ouDdp591fHhRvQkvUd8Xr38YH6mBO1VslfdmpYG6K1WQ6yL1wNMo4awenneHfO9gzmzJ naFA== 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=do2IkGTsgJZMce9dLCi5y9V7vjNX63EvX8bAUDpEGLM=; b=rVwqCUsVt4oLjXB8ukasnOLzRINy23okXallrOXf2WmseHYaI1UomBD3VwF+RECqCb /qfXZD/9wRTnr+FYNx7pB0eur9hOv3nBMviSoTqBlJq3jSqxsXdP0ztOmd/RD7/VbPIK QIQt6HWcXTEL5eRaw9zTOVlqMWXQxyQp569glqP5BxGesSdjSXomZQ0hK4JSbDl4etEO +vPL2wENEHM69mjMEa32OdnNMtrT7WGgJHM+HDo0iDJIwrO+WDDgdFG7i3c5hoqDkL5Q 4yBYAgcE32YfianEnxTB7GZmFbwDSjD0VxyHeiQ6O29xjasxRgVCnEjAvtcN0lNRfgUn KJzw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=GZPVvErj; 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 r25si20503078edc.210.2020.11.03.06.52.08; Tue, 03 Nov 2020 06:52:30 -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=GZPVvErj; 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 S1729667AbgKCOUu (ORCPT + 99 others); Tue, 3 Nov 2020 09:20:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40284 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729232AbgKCNpP (ORCPT ); Tue, 3 Nov 2020 08:45:15 -0500 Received: from mail-qt1-x842.google.com (mail-qt1-x842.google.com [IPv6:2607:f8b0:4864:20::842]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 021B0C0613D1; Tue, 3 Nov 2020 05:45:15 -0800 (PST) Received: by mail-qt1-x842.google.com with SMTP id c5so11584864qtw.3; Tue, 03 Nov 2020 05:45:14 -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=do2IkGTsgJZMce9dLCi5y9V7vjNX63EvX8bAUDpEGLM=; b=GZPVvErj4PHBMLqkcSjbNmjmJr4IFQAsCF6LbDLPnOqXfs7SLj1TTKqhDmNgH840z/ JMTtucvAwREP+cEU+Z5Iz9lcArpHDNTiECZewb/MjCmRhNpQ6PuqqdTsVjqPNl8xvRdo sip44uxOeEAEVkGMyHAODxwQELEMs/kd6J09+5V1ZmN3zfpxAieTNiIx3evs2766AEOo gEP+Z4M+G2wLoWKjcrT41XHAyl01UzldioGtYHEGV1haEI4YToOheJ1zn1dRAZHSXrbf pKglRVS7f6vVvyFumFCM3MU4VHkFYyeDA7+teIbMSHjdZA03RLUMjsja8eSRa7PJSF9s Z5Wg== 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=do2IkGTsgJZMce9dLCi5y9V7vjNX63EvX8bAUDpEGLM=; b=QEv3j+gKk05w7Izq+8719nIBaPYK8YTtsuT/2pXuBxIOWoUenxhvrG6GwbiQftmxhg rTrzUfII6DvcS+exru+2gaF9JaVN5WvhCZZgQyoagOZbjneL2YjuJCncP331ZMKVyoOn H+fWrryZXUL3h31OQpVk+MLtoFYSFYtRxD/GGBawCOfU7fRDJbbBti7fc5ZDwLNS6/91 F8L7xC2u660EbLQV9J7gdMpSshc82OccXLmeCMoJBaSCmTX2ana+N3DlPGjFjn3ipS7R jsbUOA5ybKmSu2BV2S+WlR53iR83FLdJY4aAZ1NEJIf16EpIF5rYQ/4eSmQwdpnyagjb vmVg== X-Gm-Message-State: AOAM533gxYZ43bjDWzDxOHRvJYZ7697dyxJd4xij5/oxt/8YeC36w3gV 9L7dDbF/YXRia5DFbbEc7s0= X-Received: by 2002:a05:622a:8a:: with SMTP id o10mr19841485qtw.274.1604411113872; Tue, 03 Nov 2020 05:45:13 -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.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Nov 2020 05:45:13 -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 4/8] riscv: Enable seccomp architecture tracking Date: Tue, 3 Nov 2020 07:43:00 -0600 Message-Id: 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 riscv. Signed-off-by: YiFei Zhu --- arch/riscv/include/asm/seccomp.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/arch/riscv/include/asm/seccomp.h b/arch/riscv/include/asm/seccomp.h index bf7744ee3b3d..c7ee6a3507be 100644 --- a/arch/riscv/include/asm/seccomp.h +++ b/arch/riscv/include/asm/seccomp.h @@ -7,4 +7,14 @@ #include +#ifdef CONFIG_64BIT +# define SECCOMP_ARCH_NATIVE AUDIT_ARCH_RISCV64 +# define SECCOMP_ARCH_NATIVE_NR NR_syscalls +# define SECCOMP_ARCH_NATIVE_NAME "riscv64" +#else /* !CONFIG_64BIT */ +# define SECCOMP_ARCH_NATIVE AUDIT_ARCH_RISCV32 +# define SECCOMP_ARCH_NATIVE_NR NR_syscalls +# define SECCOMP_ARCH_NATIVE_NAME "riscv32" +#endif + #endif /* _ASM_SECCOMP_H */ -- 2.29.2