Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp656515pxx; Wed, 28 Oct 2020 13:35:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyIMxoh4y/flQXfwwIsZ6AK250X7kdsPtWtLLN+9qdsCVngaKB7G78JtOA7jvyK4vWQwFsk X-Received: by 2002:aa7:d6da:: with SMTP id x26mr731725edr.238.1603917359062; Wed, 28 Oct 2020 13:35:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603917359; cv=none; d=google.com; s=arc-20160816; b=XnTvJPW22hfJg7r8fHGfzFB8JrJ7i/ZluofGiDorp/tHX7gsRLC2L8GoDwZJx3WsGv vmhpVtH3uBDV2g/nciVWJrhq343rGHunEnO5gyb4XBxLEasdw4vITo2GVTH0+QE1jpv4 M3/nczcSGkdYpInrb0H2q+6xeuEXWPl4j/We67aKgk2/tcISUMtIR+NXKigQA340f7Cl dpiNsEiHSzuzTdqXt82Gcyv7bAtxQ9iQP3bF8eDNodJn27SX6rJT2uD1sy+ODbvVD/KP U8TEbFpLjKNbewq//me5razfhu6VR4IFLcGYCwNYC08CBF+87+3sZ//HP9PrvzLZga54 YTBw== 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=gV/VVwoohxFwknw5Qn01WhfBtKTfE0pEszhFmiVXe+4=; b=df92uGzvZQoFNxXvahLl5V00CtIZmBOZSr8OkN8ZkII7Ji5roYtOkkCZ+sxpOkBrzC HY3pZw4KzvwOGuikMNrj8ZxTMAsxqKILSJeGTkYCf/M4OxMz3fuvOPclfDJ47SGztcA9 zPN7tnJJEvoOkrbDlETq/r9+xDFrNAAjc9zTgCdCQfc2+14mst9M4aW0DO+KaKhHLWiX UkP7WLOK68C2whGaHmotkTsmxT+Hz8OEBi6+Ojm63AWzSyDsUznV5JS7rPD0mm8hjqZG JZDf9QwiWzngK8rzMY8k4f6uGztZROaYAiUbl1Ju8hnJaGMblPeDa9XaC/ORHBxThlls V23A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=bUUyctzc; 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=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n18si9672edr.422.2020.10.28.13.35.36; Wed, 28 Oct 2020 13:35:59 -0700 (PDT) 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=@chromium.org header.s=google header.b=bUUyctzc; 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=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1829562AbgJ0TPr (ORCPT + 99 others); Tue, 27 Oct 2020 15:15:47 -0400 Received: from mail-pl1-f196.google.com ([209.85.214.196]:38433 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1829544AbgJ0TOz (ORCPT ); Tue, 27 Oct 2020 15:14:55 -0400 Received: by mail-pl1-f196.google.com with SMTP id f21so1276319plr.5 for ; Tue, 27 Oct 2020 12:14:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=gV/VVwoohxFwknw5Qn01WhfBtKTfE0pEszhFmiVXe+4=; b=bUUyctzcMSA6GV80xlX1omAD5lD1Q6cPzFS+DHgg4vnT5jm2fUe+9kyTyf1UtGDex9 e7+aXR4zgdP6JfIYXGGlXWxmD/enEyR76EowHH08WydLVpuwbGdyeqYD7pW7wyRu24Ni cTpdJdaLJrOKGJEyA3oq5BVxfJ0ac1hK5p9Ck= 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=gV/VVwoohxFwknw5Qn01WhfBtKTfE0pEszhFmiVXe+4=; b=L1ovYiDuO7gp8N7xWV89IYOvCmM91ixMLoHnqgXXBDUC3y0xY2mvG08Xh/XDtMh85j omvFB32hTZraNtmT0VZByDDosc+DJF+ptcHlqQD9S/Ctn0qqUOXfYTboIO6T/O7UokG/ a9S7NRLpqG682LjpP9Rx1foHQiLCWcYpegaFnLfp7w/zHTaPSXvFpa0N05FxV80PDSP4 mezNPymVW5eFSdDP/fH8g9RFXDWjWy6TYl9ReTi/RNldCJmwG6q1suEwv1EJm1NuBd/h QIqj0OhkQVgyHjO3ho77xaMFQjmDg8/6ET64Vua/hUnh3TdWp1tCa9k+C0rYoLj8Hi0R pe/Q== X-Gm-Message-State: AOAM531uXaKOtW5sRwkrfxf5J1TIj8uaOIs5LEHYTk0cIKyGmmdW5en5 fi65pKHVa+WE3/rTlJmaT8zSFQ== X-Received: by 2002:a17:902:6a8c:b029:d5:da81:dc42 with SMTP id n12-20020a1709026a8cb02900d5da81dc42mr3990687plk.40.1603826094485; Tue, 27 Oct 2020 12:14:54 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id m3sm3052970pfd.217.2020.10.27.12.14.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Oct 2020 12:14:53 -0700 (PDT) From: Kees Cook To: YiFei Zhu , containers@lists.linux-foundation.org Cc: Kees Cook , Tianyin Xu , Tobin Feldman-Fitzthum , Jack Chen , YiFei Zhu , Valentin Rothberg , Andrea Arcangeli , Dimitrios Skarlatos , Andy Lutomirski , David Laight , bpf@vger.kernel.org, Jann Horn , Giuseppe Scrivano , Josep Torrellas , Hubertus Franke , Will Drewry , linux-kernel@vger.kernel.org, Tycho Andersen , Aleksa Sarai Subject: Re: [PATCH v5 seccomp 0/5]seccomp: Add bitmap cache of constant allow filter results Date: Tue, 27 Oct 2020 12:14:50 -0700 Message-Id: <160382601078.2318738.11754677445961373147.b4-ty@chromium.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 11 Oct 2020 10:47:41 -0500, YiFei Zhu wrote: > Alternative: https://lore.kernel.org/lkml/20200923232923.3142503-1-keescook@chromium.org/T/ > > Major differences from the linked alternative by Kees: > * No x32 special-case handling -- not worth the complexity > * No caching of denylist -- not worth the complexity > * No seccomp arch pinning -- I think this is an independent feature > * The bitmaps are part of the filters rather than the task. > > [...] Applied to for-next/seccomp, thanks! I left off patch 5 for now until we sort out the rest of the SECCOMP_FILTER architectures, and tweaked patch 3 to include the architecture names. [1/4] seccomp/cache: Lookup syscall allowlist bitmap for fast path https://git.kernel.org/kees/c/f94defb8bf46 [2/4] seccomp/cache: Add "emulator" to check if filter is constant allow https://git.kernel.org/kees/c/e7dc9f1e5f6b [3/4] x86: Enable seccomp architecture tracking https://git.kernel.org/kees/c/1f68a4d393fe [4/4] selftests/seccomp: Compare bitmap vs filter overhead https://git.kernel.org/kees/c/57a339117e52 -- Kees Cook