Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp592558pxk; Thu, 24 Sep 2020 13:12:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxH7fEq/7EwGFwMWCxLY1IMLolU/fAbR9pACQRXSbFN55QiI6aKeqRwUfPY766Ga+a3ddj5 X-Received: by 2002:a17:906:9443:: with SMTP id z3mr384042ejx.156.1600978348241; Thu, 24 Sep 2020 13:12:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600978348; cv=none; d=google.com; s=arc-20160816; b=ILwpovNqfgnfpzLNFraiGlgOiHLsZqKe4cFPFRee2mEVqi+LKQjstRcenacANTpoXb sIOuQBQlqUV5gs2xLETqmJQmYthEzw3c52XC5E9kvsFf1L0YtanfUvcsnO1cFDvPBBYu Ox17YmIP8Mr+86GKS7nSkU4+p4pBi0eb5Znau80WBrrejDJ6NwmjEPs9nehrvkcLpgcG fdgTQsLymp+4yzjWDeVo/j3tTPM1ob1NTyoYPMjz800AE5zL5QfSdZreIzTNAWldu5L2 A7J9LCqmjoQvZhrBiz0P+08Q+tYvXLEdAy557oANBpmosrjfGDEjo76+jhhhfv7gJMip Gr/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=+MD2QubiwKdZDJzjnc2wAOK3dZyKxhcYOawuWHop+Wo=; b=A78KoQpJJq2eyDzZt+f++U0RRi+RINabdQmaxAMyQ1Cg6NSxxVp8PgAUUDqtLAEStn qqEW+Ap5r8nXGXPT+kaJFCBumDVsYyb/TJ0E0PC4hU00ymsf/kVgRk88Of1GU8vp4n/A aTioEOGmaAwCoxJPRdCBGLTJUFzi5/qh9OlRF/l79XaWoiH03PH5vsaFJ/02kSubr9Vp ADpagf1auEyxkDkRZYCKrN3Z9Xb6YVjgedKFVHoXrfWz5koU0PoxocbqXvQxjF1J57OC qDgSJVMlI4+nYYHiVz4fKmKHYxlvnAlJcvPxJoGVZ/Ds/FXobz+m7WQP0riHxbh/TpMr P57g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=avbGCQqM; 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 a4si328158edb.358.2020.09.24.13.12.04; Thu, 24 Sep 2020 13:12:28 -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=avbGCQqM; 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 S1726557AbgIXUIe (ORCPT + 99 others); Thu, 24 Sep 2020 16:08:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53842 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726458AbgIXUId (ORCPT ); Thu, 24 Sep 2020 16:08:33 -0400 Received: from mail-pf1-x443.google.com (mail-pf1-x443.google.com [IPv6:2607:f8b0:4864:20::443]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 798ACC0613D3 for ; Thu, 24 Sep 2020 13:00:37 -0700 (PDT) Received: by mail-pf1-x443.google.com with SMTP id l126so489771pfd.5 for ; Thu, 24 Sep 2020 13:00:37 -0700 (PDT) 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=+MD2QubiwKdZDJzjnc2wAOK3dZyKxhcYOawuWHop+Wo=; b=avbGCQqM983qSOxtkvStgCWx9sRpEeKEGDHd9YWkndoou2/aH5siCielYiOMrMzduL Fe2noZykDUuGZ4LQR9NHfzh+YZq63h5jKJDfKza+jfdwvAziUO2yCVU35rzmrXXSDvW8 Up/SO6HKiwkFMBN2H+97Gna9dqtcH5g3Y0HbI= 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=+MD2QubiwKdZDJzjnc2wAOK3dZyKxhcYOawuWHop+Wo=; b=HLWXfUczJNDs2waGBD3YBOLuJholyMxHXDECasuaJp19p1xv10rHpoGdeY15WAlayo cMXjDs+zj6kCi9U3e8quAWV4/hy341lXMkP+p1gFJaljfQJfQPOMJc3Ph42yS+ys8nhq 0wyuiRzc5+e0/jloNU/FN/DGo6Lfp7QMLfgNhQOUmONubI6aBOEAGe/fqBWFoxyVJeE3 jVvUifFmfJAzfJlCe+ytNi8AGIdtWzoJqJbdcPL4UyKLLZcdMz5hITdSzSFWXqmOKoAY 48Pi52mkiyEKXCIZAXAbsrWJCveDA6hb0SAlsipiKPxRyPS7R4srq56P4GoobWwetb3g RIKA== X-Gm-Message-State: AOAM531dFRTuGu+9VKfJ52vV4OAlUyS2xl2EK9gNoBMhivmdWN77AHkP 6IjEHwv8Xhl1SMIuR5duT8/vsA== X-Received: by 2002:a63:1464:: with SMTP id 36mr606764pgu.160.1600977636906; Thu, 24 Sep 2020 13:00:36 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id c9sm295293pfn.78.2020.09.24.13.00.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Sep 2020 13:00:35 -0700 (PDT) Date: Thu, 24 Sep 2020 13:00:34 -0700 From: Kees Cook To: Andrea Arcangeli Cc: YiFei Zhu , Jann Horn , Christian Brauner , Tycho Andersen , Andy Lutomirski , Will Drewry , Giuseppe Scrivano , Tobin Feldman-Fitzthum , Dimitrios Skarlatos , Valentin Rothberg , Hubertus Franke , Jack Chen , Josep Torrellas , Tianyin Xu , bpf@vger.kernel.org, containers@lists.linux-foundation.org, linux-api@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v1 0/6] seccomp: Implement constant action bitmaps Message-ID: <202009241253.7D238A4@keescook> References: <20200923232923.3142503-1-keescook@chromium.org> <20200924185702.GA9225@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200924185702.GA9225@redhat.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 24, 2020 at 02:57:02PM -0400, Andrea Arcangeli wrote: > Hello, > > I'm posting this only for the record, feel free to ignore. > > On Wed, Sep 23, 2020 at 04:29:17PM -0700, Kees Cook wrote: > > rfc: https://lore.kernel.org/lkml/20200616074934.1600036-1-keescook@chromium.org/ > > alternative: https://lore.kernel.org/containers/cover.1600661418.git.yifeifz2@illinois.edu/ > > v1: > > - rebase to for-next/seccomp > > - finish X86_X32 support for both pinning and bitmaps > > It's pretty clear the O(1) seccomp filter bitmap was first was > proposed by your RFC in June (albeit it was located in the wrong place > and is still in the wrong place in v1). > > > - replace TLB magic with Jann's emulator > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > > That's a pretty fundamental change in v1 compared to your the > non-competing TLB magic technique you used in the RFC last June. > > The bitmap isn't the clever part of the patch, the bitmap can be > reviewed in seconds, the difficult part to implement and to review is > how you fill the bitmap and in that respect there's absolutely nothing > in common in between the "rfc:" and the "alternative" link. > > In June your bitmap-filling engine was this: > > https://lore.kernel.org/lkml/20200616074934.1600036-5-keescook@chromium.org/ > > Then on Sep 21 YiFei Zhu posted his new innovative BPF emulation > innovation that obsoleted your TLB magic of June: > > https://lists.linuxfoundation.org/pipermail/containers/2020-September/042153.html > > And on Sep 23 instead of collaborating and helping YiFei Zhu to > improve his BPF emulator, you posted the same technique that looks > remarkably similar without giving YiFei Zhu any attribution and you > instead attribute the whole idea to Jann Horn: > > https://lkml.kernel.org/r/20200923232923.3142503-5-keescook@chromium.org ?? Because it IS literally Jann's code: https://lore.kernel.org/lkml/CAG48ez1p=dR_2ikKq=xVxkoGg0fYpTBpkhJSv1w-6BG=76PAvw@mail.gmail.com/ As the first reply to 20200616074934.1600036-5-keescook@chromium.org. In June. Which I agreed was the way to go. In June. And When YiFei Zhu sent their series, I saw they were headed in a direction that looked functionally similar, but significantly over-engineered, and done without building on the June RFC and its discussion. So I raised the priority of putting Jann's code in to the RFC, so I could send out an update demonstrating both how small I would like the emulator to be, and how to handle things like x32. How, exactly, am I not collaborating? I was literally trying to thread-merge and avoid (more) extra work on YiFei Zhu's end. -- Kees Cook