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=-0.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS 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 7C553C282DD for ; Thu, 9 Jan 2020 18:23:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5213A2072E for ; Thu, 9 Jan 2020 18:23:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1578594212; bh=dd8EZ98uqK9j/Oi18ACAq5NTaNf++Pvoytvm/sNE+kA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=X+K+qbL392O+nL2cQtZzsMsZvrj9T1wnSNuRqNK/UUdcrNC5us+N/5kt+q1XYKdoE MWFamxKCDr+bBi9orNhKoDQtVo0tX4Te9hvVMxUlsPBWv/Ld5gU06qRCiONDj8Sxom 8LrZtoIGpAxZ9ngSpkt49u6k32NtjTFP+FlJJvec= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732089AbgAISX3 (ORCPT ); Thu, 9 Jan 2020 13:23:29 -0500 Received: from mail.kernel.org ([198.145.29.99]:38614 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730290AbgAISX2 (ORCPT ); Thu, 9 Jan 2020 13:23:28 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1498E2067D; Thu, 9 Jan 2020 18:23:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1578594207; bh=dd8EZ98uqK9j/Oi18ACAq5NTaNf++Pvoytvm/sNE+kA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=t6jaL5GY6Q8j7Hix4nuqr0SocWjFn9qv6xxpg7JI2qICGbUi8ugQenpQMkEfSfC/D A3B2kTbzWuDV6E/gYyk0YrAUdgUT0fgqFUUu39awk4gAAVsSkpT9W+FkBbkqqYi/k0 fykNo+rcgdgxZwYRTdjkrs0P3gPVYw2cPDOOCrxw= Date: Thu, 9 Jan 2020 19:23:24 +0100 From: Greg Kroah-Hartman To: James Morris Cc: Stephen Smalley , Kees Cook , KP Singh , Casey Schaufler , open list , bpf , linux-security-module@vger.kernel.org, Alexei Starovoitov , Daniel Borkmann , Thomas Garnier , Michael Halcrow , Paul Turner , Brendan Gregg , Jann Horn , Matthew Garrett , Christian Brauner , =?iso-8859-1?Q?Micka=EBl_Sala=FCn?= , Florent Revest , Brendan Jackman , Martin KaFai Lau , Song Liu , Yonghong Song , "Serge E. Hallyn" , Mauro Carvalho Chehab , "David S. Miller" , Nicolas Ferre , Stanislav Fomichev , Quentin Monnet , Andrey Ignatov , Joe Stringer , Paul Moore Subject: Re: [PATCH bpf-next v1 00/13] MAC and Audit policy using eBPF (KRSI) Message-ID: <20200109182324.GC591973@kroah.com> References: <20191220154208.15895-1-kpsingh@chromium.org> <95036040-6b1c-116c-bd6b-684f00174b4f@schaufler-ca.com> <201912301112.A1A63A4@keescook> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: owner-linux-security-module@vger.kernel.org Precedence: bulk List-ID: On Fri, Jan 10, 2020 at 05:11:38AM +1100, James Morris wrote: > On Wed, 8 Jan 2020, Stephen Smalley wrote: > > > The cover letter subject line and the Kconfig help text refer to it as a > > BPF-based "MAC and Audit policy". It has an enforce config option that > > enables the bpf programs to deny access, providing access control. IIRC, in > > the earlier discussion threads, the BPF maintainers suggested that Smack and > > other LSMs could be entirely re-implemented via it in the future, and that > > such an implementation would be more optimal. > > In this case, the eBPF code is similar to a kernel module, rather than a > loadable policy file. It's a loadable mechanism, rather than a policy, in > my view. > > This would be similar to the difference between iptables rules and > loadable eBPF networking code. I'd be interested to know how the > eBPF networking scenarios are handled wrt kernel ABI. I already know of some people who pre-compile ebpf programs based on a number of "supported" kernel versions and then load the needed one at runtime. Messy, yes, but you are right, ebpf code is much more similiar to a kernel module than userspace code at the moment. thanks, greg k-h