From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 90FE1C388F7 for ; Wed, 4 Nov 2020 00:11:46 +0000 (UTC) Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 02C1D223C7 for ; Wed, 4 Nov 2020 00:11:45 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="mPTbV2Uh" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 02C1D223C7 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=containers-bounces@lists.linux-foundation.org Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 79E1087098; Wed, 4 Nov 2020 00:11:45 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xQBuHw14NtQw; Wed, 4 Nov 2020 00:11:44 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by whitealder.osuosl.org (Postfix) with ESMTP id BDF0687038; Wed, 4 Nov 2020 00:11:44 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id A4534C088B; Wed, 4 Nov 2020 00:11:44 +0000 (UTC) Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by lists.linuxfoundation.org (Postfix) with ESMTP id 8F60BC0051 for ; Wed, 4 Nov 2020 00:11:43 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 82DD78707F for ; Wed, 4 Nov 2020 00:11:43 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 96jXRptWp4GX for ; Wed, 4 Nov 2020 00:11:42 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pg1-f195.google.com (mail-pg1-f195.google.com [209.85.215.195]) by whitealder.osuosl.org (Postfix) with ESMTPS id BE81087038 for ; Wed, 4 Nov 2020 00:11:42 +0000 (UTC) Received: by mail-pg1-f195.google.com with SMTP id r10so15000532pgb.10 for ; Tue, 03 Nov 2020 16:11:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=NFjsAF4kgpQCHVIlKmgYN6bEVL36r1XibqsUv152D08=; b=mPTbV2UhVfnJP2OoJL4D5QLosesGivMu0Yj5j7pkCrVtHA6dueaCzR1JSWWklnSxS2 Wgzos2joCi+Wlp8KUeVXQhCOJbK/Z4g4eTF82BJYkvr8uaU2CIt3++/EZgLF7nCLiPmR RFfDgHAz/9hjV1ZrPMZTrZyKkXhcZM/AoX3+w= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=NFjsAF4kgpQCHVIlKmgYN6bEVL36r1XibqsUv152D08=; b=CfEGw8wmRhI8i8Om4oeVHmOx+yg0sM7hmTybod6RWq0ZcmpE3Ln2dPL6I/dPOmCttZ yRngOkC7XZ2g3qQVao0uW8kCiLrL3knJWzlRMZVYMnz06aR9G/h/Yk7TOMUyM7CMtXaM lmF7f3s+68L/DGPjsW5cYK/iA7e+IMPyGbg42TZXweWX9s4s9yQWv7sUXVOK2O+Dwb// pupA8cg0jiwRTE0DHyrOl5dzqs/Xsoam5yHjCTdaZAZ0GuUJWxTLRBHDbbGgJAFmJMIk 5IaBwsDvL4uh3cMbp/XbSfqILRuttEjQDOqSBaEDztks5xpmcpRlCbAkR3xOT+PiGZzW n1Og== X-Gm-Message-State: AOAM533OVhX6iZrps7izIOgjyYfw0b6ewcsQB8RPOrG5iGMhDV2/FSrK 2ROwyGGoJQy31n6Umk4MUC1B5Q== X-Google-Smtp-Source: ABdhPJybME+aS3qtjx8JuwpcYMqCGEp0y1Q8idII2QCmSunt2ifzlNcehSCk1E6c+iZLzWwdlgTh0g== X-Received: by 2002:a17:90a:5285:: with SMTP id w5mr1762165pjh.50.1604448702345; Tue, 03 Nov 2020 16:11:42 -0800 (PST) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id j20sm118311pgl.40.2020.11.03.16.11.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Nov 2020 16:11:41 -0800 (PST) Date: Tue, 3 Nov 2020 16:11:40 -0800 From: Kees Cook To: YiFei Zhu Subject: Re: [PATCH seccomp 0/8] seccomp: add bitmap cache support on remaining arches and report cache in procfs Message-ID: <202011031606.423EC9E@keescook> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Cc: linux-sh@vger.kernel.org, Tobin Feldman-Fitzthum , Hubertus Franke , Jack Chen , linux-riscv@lists.infradead.org, Andrea Arcangeli , linux-s390@vger.kernel.org, YiFei Zhu , linux-csky@vger.kernel.org, Tianyin Xu , linux-xtensa@linux-xtensa.org, Jann Horn , Valentin Rothberg , Josep Torrellas , Will Drewry , linux-parisc@vger.kernel.org, containers@lists.linux-foundation.org, linux-kernel@vger.kernel.org, Andy Lutomirski , Dimitrios Skarlatos , David Laight , Giuseppe Scrivano , linuxppc-dev@lists.ozlabs.org X-BeenThere: containers@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Linux Containers List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: containers-bounces@lists.linux-foundation.org Sender: "Containers" On Tue, Nov 03, 2020 at 07:42:56AM -0600, YiFei Zhu wrote: > From: YiFei Zhu > > This patch series enables bitmap cache for the remaining arches with > SECCOMP_FILTER, other than MIPS. > > I was unable to find any of the arches having subarch-specific NR_syscalls > macros, so generic NR_syscalls is used. SH's syscall_get_arch seems to > only have the 32-bit subarch implementation. I'm not sure if this is > expected. > > This series has not been tested; I have not built all the cross compilers > necessary to build test, let alone run the kernel or benchmark the > performance, so help on making sure the bitmap cache works as expected > would be appreciated. The series applies on top of Kees's for-next/seccomp > branch. Thank you! This looks good. I wonder if the different handling of little endian is worth solving -- I'm suspicious about powerpc's use of __LITTLE_ENDIAN__ vs a CONFIG, but I guess the compiler would match the target endian-ness. Regardless, it captures what the architectures are doing, and gets things standardized. > > YiFei Zhu (8): > csky: Enable seccomp architecture tracking > parisc: Enable seccomp architecture tracking I don't have compilers for these. > powerpc: Enable seccomp architecture tracking > riscv: Enable seccomp architecture tracking > s390: Enable seccomp architecture tracking These I can build-test immediately. > sh: Enable seccomp architecture tracking > xtensa: Enable seccomp architecture tracking These two are available in Ubuntu's cross compiler set, so I'll get them added to my cross-builders. > seccomp/cache: Report cache data through /proc/pid/seccomp_cache In the meantime, I'll wait a bit to see if we can get some Acks/Reviews from arch maintainers. :) -Kees > > arch/Kconfig | 15 ++++++++ > arch/csky/include/asm/Kbuild | 1 - > arch/csky/include/asm/seccomp.h | 11 ++++++ > arch/parisc/include/asm/Kbuild | 1 - > arch/parisc/include/asm/seccomp.h | 22 +++++++++++ > arch/powerpc/include/asm/seccomp.h | 21 +++++++++++ > arch/riscv/include/asm/seccomp.h | 10 +++++ > arch/s390/include/asm/seccomp.h | 9 +++++ > arch/sh/include/asm/seccomp.h | 10 +++++ > arch/xtensa/include/asm/Kbuild | 1 - > arch/xtensa/include/asm/seccomp.h | 11 ++++++ > fs/proc/base.c | 6 +++ > include/linux/seccomp.h | 7 ++++ > kernel/seccomp.c | 59 ++++++++++++++++++++++++++++++ > 14 files changed, 181 insertions(+), 3 deletions(-) > create mode 100644 arch/csky/include/asm/seccomp.h > create mode 100644 arch/parisc/include/asm/seccomp.h > create mode 100644 arch/xtensa/include/asm/seccomp.h > > > base-commit: 38c37e8fd3d2590c4234d8cfbc22158362f0eb04 > -- > 2.29.2 -- Kees Cook _______________________________________________ Containers mailing list Containers@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/containers