Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp5986326ybf; Thu, 5 Mar 2020 10:48:03 -0800 (PST) X-Google-Smtp-Source: ADFU+vssYZk6KoPlGIkh1ujQy9LDv5RDCDMR5WRG4VysqKx04jO8pWKy3Ny0TdKaWzsrc074LS8F X-Received: by 2002:a05:6830:1b6e:: with SMTP id d14mr7807633ote.117.1583434083300; Thu, 05 Mar 2020 10:48:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583434083; cv=none; d=google.com; s=arc-20160816; b=TwG35aG2UadVzo1rbt/uGzGmTwrKcgCAx2jJ0C2WkDZc3Xm9mwa02AjB1a0O9rNNw7 acuI53Cd2ebcuDmsI4gXzEsnbLk3Vaug6K+mRuTfX1V9yjHMp0qJAjZZRM/33wjbDPzT o90KN759Wdv2LYtGUFr9RgTJaGsTYKwK5MNAU8YcnGGrDwo8JcT28qYW9dCDVPFDvzu/ cWq+nm2Xgj/c91aMTB3I5SjqS9OLAcg/HyEOiTKcYQMf1/Wrd2+n4eA1mPoPOYUOJ8me dG2Lmg8Uqn8Hlean1MtHsOPA/01phymwiWHEi/S19uhU+GPzYpmPio1h+O9JFQ1XdleM a8Dg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:autocrypt:from:references:cc:to:subject:dkim-signature; bh=GcY1vK8yKtz85gn0IdfY2ICNUki/N1ewme/5hJvjsOw=; b=S/DSt1hRKMuvDghlZa9kjNxjd5BZbMDfjjKQK7YQxiQShPgEMprEzOsiQS8xDwbdc2 s1Dun0dr5gJwjqy1CmpA43qMCVzELeuvVoAxV1Kf83JAR2K4RG+tZs8Zqp1yvih+fBx0 PA+Hi/KZcR1GQo5VWZFMSI/V9TvWtM1q2jqf7Vy0jkc7aMlno0lD4/6tqqyIDGR5f+3R aZewnYhCzyNtKoSrwqeqEetJ3FXs7OV9ShMe6jKI0NRaxT/6QbNsxPTISu/ybQZm8cJb WKLVvhGAGZWVjKAJw04O47kj6nRoiVTjG50vfBtN6dLKv9S2zPhikohl6xMGtuSU38WB pqLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@yahoo.com header.s=s2048 header.b=DN56SIMK; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r23si3947656otd.203.2020.03.05.10.47.51; Thu, 05 Mar 2020 10:48:03 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@yahoo.com header.s=s2048 header.b=DN56SIMK; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726358AbgCESrT (ORCPT + 99 others); Thu, 5 Mar 2020 13:47:19 -0500 Received: from sonic305-27.consmr.mail.ne1.yahoo.com ([66.163.185.153]:33811 "EHLO sonic305-27.consmr.mail.ne1.yahoo.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726020AbgCESrR (ORCPT ); Thu, 5 Mar 2020 13:47:17 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1583434035; bh=GcY1vK8yKtz85gn0IdfY2ICNUki/N1ewme/5hJvjsOw=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From:Subject; b=DN56SIMKyQ9w0Obi4fhbFjWzlj9+81cBRaGY11RdxX1AZp3RK/oD9ZJOhjqrWq19Vii1cVGxYAVzJCFBHY251UMe6qwHIiBRFwfkZcMGKWn4SiM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x9K6GcA1xPc7cva7lNiUj55hwOjLrhR.qbtDbX7eWnsRh6.qdWpdQmylnkG6QsvUmPRMnq5.cfGE LrV9ulkD.BSk16BaPaFaTlrrgbMeUUtQZmSZsgnXKzC60n3ZuYdGg5oibCnhViwbVMqPxCk1eJc2 3uFRqawrq39nz4y5.WcOkdhgWSj0OjsXQMO0CDS.3btkZonw.U8JTlN0IybIgrH.8lsu2OW1nKiv SQHJMTfvTfwBOOCwdFCn8Nd.Gmd5a8If6X4lUnme8JjyvPBW8xRTreImIWCQb8nZwSJQjkNGdLMw IDlIaLEHTqVhH_zggWGgnD7rPpxN5.20HBKNSO.zMJvTq4jgbvbFzWMjEIJj_K2xWAOAQ3ZmC0xn duYE9kK5Uf1nTufyguflvTxObP_2kr76MzRTax0El3JquNT8m1tu7ObuI_Z_yvxwDZ.TKk6bbAze TklLkOQn3l7lGSK8Ex2xBZ7lNBWnvOOthx7aXx36T4oQeTD_Hd2ocwWJ4N9VsC5o_bwoxvJJS0LN YvZERPHVYUyoenxXJo3ZLLAL3JBhK89ADWqS9IJU8ck_0nqAVMxm5KL_ZtnlJ.oJyddNRoEbWiiJ KxEcvBEmdhW50WGC_jzsY0XtqdRw3axg1j.qnBqQ- Received: from sonic.gate.mail.ne1.yahoo.com by sonic305.consmr.mail.ne1.yahoo.com with HTTP; Thu, 5 Mar 2020 18:47:15 +0000 Received: by smtp429.mail.bf1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 18dcc0ab0dcb8d07abc4d3534f6927eb; Thu, 05 Mar 2020 18:47:12 +0000 (UTC) Subject: Re: [PATCH bpf-next v4 3/7] bpf: Introduce BPF_MODIFY_RETURN To: Stephen Smalley Cc: KP Singh , linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org, bpf@vger.kernel.org, Andrii Nakryiko , Alexei Starovoitov , Daniel Borkmann , Paul Turner , Jann Horn , Florent Revest , Brendan Jackman , jmorris@namei.org, Paul Moore References: <20200304191853.1529-1-kpsingh@chromium.org> <20200304191853.1529-4-kpsingh@chromium.org> <20200305155421.GA209155@google.com> From: Casey Schaufler Autocrypt: addr=casey@schaufler-ca.com; keydata= mQINBFzV9HABEAC/mmv3jeJyF7lR7QhILYg1+PeBLIMZv7KCzBSc/4ZZipoWdmr77Lel/RxQ 1PrNx0UaM5r6Hj9lJmJ9eg4s/TUBSP67mTx+tsZ1RhG78/WFf9aBe8MSXxY5cu7IUwo0J/CG vdSqACKyYPV5eoTJmnMxalu8/oVUHyPnKF3eMGgE0mKOFBUMsb2pLS/enE4QyxhcZ26jeeS6 3BaqDl1aTXGowM5BHyn7s9LEU38x/y2ffdqBjd3au2YOlvZ+XUkzoclSVfSR29bomZVVyhMB h1jTmX4Ac9QjpwsxihT8KNGvOM5CeCjQyWcW/g8LfWTzOVF9lzbx6IfEZDDoDem4+ZiPsAXC SWKBKil3npdbgb8MARPes2DpuhVm8yfkJEQQmuLYv8GPiJbwHQVLZGQAPBZSAc7IidD2zbf9 XAw1/SJGe1poxOMfuSBsfKxv9ba2i8hUR+PH7gWwkMQaQ97B1yXYxVEkpG8Y4MfE5Vd3bjJU kvQ/tOBUCw5zwyIRC9+7zr1zYi/3hk+OG8OryZ5kpILBNCo+aePeAJ44znrySarUqS69tuXd a3lMPHUJJpUpIwSKQ5UuYYkWlWwENEWSefpakFAIwY4YIBkzoJ/t+XJHE1HTaJnRk6SWpeDf CreF3+LouP4njyeLEjVIMzaEpwROsw++BX5i5vTXJB+4UApTAQARAQABtChDYXNleSBTY2hh dWZsZXIgPGNhc2V5QHNjaGF1Zmxlci1jYS5jb20+iQJUBBMBCAA+FiEEC+9tH1YyUwIQzUIe OKUVfIxDyBEFAlzV9HACGwMFCRLMAwAFCwkIBwIGFQoJCAsCBBYCAwECHgECF4AACgkQOKUV fIxDyBG6ag/6AiRl8yof47YOEVHlrmewbpnlBTaYNfJ5cZflNRKRX6t4bp1B2YV1whlDTpiL vNOwFkh+ZE0eI5M4x8Gw2Oiok+4Q5liA9PHTozQYF+Ia+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.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Content-Language: en-US X-Mailer: WebService/1.1.15302 hermes Apache-HttpAsyncClient/4.1.4 (Java/1.8.0_241) Content-Length: 1003 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 3/5/2020 10:03 AM, Stephen Smalley wrote: > On Thu, Mar 5, 2020 at 12:35 PM Casey Schaufler wrote: >> I believe that I have stated that order isn't my issue. >> Go first, last or as specified in the lsm list, I really >> don't care. We'll talk about what does matter in the KRSI >> thread. > Order matters when the security module logic (in this case, the BPF > program) is loaded from userspace and > the userspace process isn't already required to be fully privileged > with respect to the in-kernel security modules. > CAP_MAC_ADMIN was their (not unreasonable) attempt to check that > requirement; it just doesn't happen to convey > the same meaning for SELinux since SELinux predates the introduction > of CAP_MAC_ADMIN (in Linux at least) and > since SELinux was designed to confine even processes with capabilities. If KRSI "needs" to go last, I'm fine with that. What I continue to object to is making KRSI/BPF a special case in the code. It doesn't need to be.