Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp4063226iog; Tue, 28 Jun 2022 08:16:14 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tXz/QkK8wqNygCLLIXWT7yxg4aNuoD+v8sLu/eANosJUEK0yp+4W4X8RJ255CG3ZkLzzKA X-Received: by 2002:a63:e658:0:b0:40d:dfde:89f7 with SMTP id p24-20020a63e658000000b0040ddfde89f7mr11916915pgj.178.1656429373915; Tue, 28 Jun 2022 08:16:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656429373; cv=none; d=google.com; s=arc-20160816; b=H4H8CT1dLwLuSXmLiQOVzX7nF+jYpulCfqVxAe6YH9sJ096pF8sUC1ZS2e2AT66PAO cB9r8BVSKrTi2eiUM4/6aWMgpKhBndHba5jxcKuJtDwIpzs6N9+ONCMil7BqVbJ4NsHn 7DfCsUZemFAYxaXQDDYnOg4EuchyeIzziCgVRGgI6N2JrVbAWq4jWNNr+wD9gnbBZpSI nBIzX4JLDn8aobz4HmBeG7NaGtx3bBYwFBAbg8GOs8c0XqW+DoVOYXTB81SuaTk61dJw po0U0sjicB/At8Zd2IroPMpIBZCxQ+hs0HypLbWRoN6Mci8nGOZsHiOyVG//Zariii9U +ZOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=r3T/Vv9JYSOoPod+m53QhPFgDxt80YZRfCW/0xTpL5E=; b=GnVjGgVBKOvJPsGeHHkMzXMKm9D1OgREFtSlvrKBEf4UQ0jXsTIUN0M5tDrMr/jQm8 +tjl5uGmRXAIisH1DfRanNyxMujBsB1RVDCcTIyVgXUt9M7zNbDw60cPP82eVDWGapqF CqgmlIVO4fZnWV4+PWFLz/NK7cfIwYbKGG0pK52dzIdvjZ/4HeKR7cXTWlDl32pd9+3y Y8dk/OX/D+mGxE8uJYpN1/zRIY/TDnMs8wymnKKqfir4/lQn+D2D89g1F1rIbEi33nJE sicq0vmhYJAcjpByPsnWQD3+fYKn29QusrXT7o7sJsSlvE9Z2h4Qo4tkPkq2I5KZ6qEV OrNA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cloudflare.com header.s=google header.b=BBUiogqF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=cloudflare.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p1-20020a631e41000000b003fde8b7a110si3991638pgm.648.2022.06.28.08.15.52; Tue, 28 Jun 2022 08:16:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@cloudflare.com header.s=google header.b=BBUiogqF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=cloudflare.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347606AbiF1PMH (ORCPT + 99 others); Tue, 28 Jun 2022 11:12:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44646 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347605AbiF1PL7 (ORCPT ); Tue, 28 Jun 2022 11:11:59 -0400 Received: from mail-oi1-x236.google.com (mail-oi1-x236.google.com [IPv6:2607:f8b0:4864:20::236]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3A3FC2B27B for ; Tue, 28 Jun 2022 08:11:58 -0700 (PDT) Received: by mail-oi1-x236.google.com with SMTP id u9so17538733oiv.12 for ; Tue, 28 Jun 2022 08:11:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cloudflare.com; s=google; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=r3T/Vv9JYSOoPod+m53QhPFgDxt80YZRfCW/0xTpL5E=; b=BBUiogqF5aD42O+to2up8XXG99jnen4vcvT4q3uQtZWs7+5mzSEKSYODAdtIflRbLE IPFqk4z92H9szCzlWLxTFzC+B3jy/j1V0h6mT51YkeeSnTTnN4sVfQJRfOFkpq2E1/u3 etXfIGWfuoS2l3wqhkFH0Jw1FohRaZbf9LZsk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=r3T/Vv9JYSOoPod+m53QhPFgDxt80YZRfCW/0xTpL5E=; b=rpk7p7L6B1+iL04rHHR0h9mwEJrOAND+x6olAksnO0pRZ/tn2zkAC2ZfeMyAS2BK32 rtzRLn2GKBlxcAvss6zW4PUfX09+cFgRMKompifrc1OUHqcqa2O+rCqhIFE6r2lSnTKN iSFdRTkRK/27w77TWeeXZ5j58vRpk2K5IKyuK/CLQDXQ4g4qd6P5iZv7wpWEjUIM+/k2 vGM4X8GKQNdmMbyCMazs07xVjZRVNIUZP6ueDyOiJKH3tPqfyXgLUyVfo+ts9Y6EqrPH jeZ30sJABQ6u97WfFxeejD411jWKBHvH+MRnjM2WQchk0OVMk0M2OTWgJGpWr4h8HYX3 Jy7g== X-Gm-Message-State: AJIora9tc/drgkA9EQMLzwa4hfeuHHmaGVgPbYC8CxpUWjpImuXhwaXH wkmDKOzs5neW9YJ4M391EIQItQ== X-Received: by 2002:a05:6808:9b9:b0:335:7039:8756 with SMTP id e25-20020a05680809b900b0033570398756mr65082oig.212.1656429117444; Tue, 28 Jun 2022 08:11:57 -0700 (PDT) Received: from [192.168.0.41] ([184.4.90.121]) by smtp.gmail.com with ESMTPSA id w12-20020a056870a2cc00b000f33624baa4sm9103814oak.18.2022.06.28.08.11.55 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 28 Jun 2022 08:11:56 -0700 (PDT) Message-ID: Date: Tue, 28 Jun 2022 10:11:55 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: [PATCH 0/2] Introduce security_create_user_ns() Content-Language: en-US To: Daniel Borkmann , Paul Moore , Christian Brauner Cc: Casey Schaufler , kpsingh@kernel.org, revest@chromium.org, jackmanb@chromium.org, ast@kernel.org, andrii@kernel.org, kafai@fb.com, songliubraving@fb.com, yhs@fb.com, john.fastabend@gmail.com, jmorris@namei.org, serge@hallyn.com, bpf@vger.kernel.org, linux-security-module@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-team@cloudflare.com References: <20220621233939.993579-1-fred@cloudflare.com> <20220627121137.cnmctlxxtcgzwrws@wittgenstein> <6a8fba0a-c9c9-61ba-793a-c2e0c2924f88@iogearbox.net> From: Frederick Lawler In-Reply-To: <6a8fba0a-c9c9-61ba-793a-c2e0c2924f88@iogearbox.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 6/27/22 5:15 PM, Daniel Borkmann wrote: > On 6/27/22 11:56 PM, Paul Moore wrote: >> On Mon, Jun 27, 2022 at 8:11 AM Christian Brauner >> wrote: >>> On Thu, Jun 23, 2022 at 11:21:37PM -0400, Paul Moore wrote: >> >> ... >> >>>> This is one of the reasons why I usually like to see at least one LSM >>>> implementation to go along with every new/modified hook.  The >>>> implementation forces you to think about what information is necessary >>>> to perform a basic access control decision; sometimes it isn't always >>>> obvious until you have to write the access control :) >>> >>> I spoke to Frederick at length during LSS and as I've been given to >>> understand there's a eBPF program that would immediately use this new >>> hook. Now I don't want to get into the whole "Is the eBPF LSM hook >>> infrastructure an LSM" but I think we can let this count as a legitimate >>> first user of this hook/code. >> >> Yes, for the most part I don't really worry about the "is a BPF LSM a >> LSM?" question, it's generally not important for most discussions. >> However, there is an issue unique to the BPF LSMs which I think is >> relevant here: there is no hook implementation code living under >> security/.  While I talked about a hook implementation being helpful >> to verify the hook prototype, it is also helpful in providing an >> in-tree example for other LSMs; unfortunately we don't get that same >> example value when the initial hook implementation is a BPF LSM. > > I would argue that such a patch series must come together with a BPF > selftest which then i) contains an in-tree usage example, ii) adds BPF > CI test coverage. Shipping with a BPF selftest at least would be the > usual expectation. Sounds good. I'll add both a eBPF selftest and SELinux implementation for v2. > > Thanks, > Daniel