Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp2434251ybl; Thu, 9 Jan 2020 12:41:57 -0800 (PST) X-Google-Smtp-Source: APXvYqxdKTIe/wVIDljNlSs4xz0ZmoK/RHTEzA8CRgjYkkRW5DIyu9Z+SYJWi/qlDF6PramM3G6y X-Received: by 2002:a05:6830:2014:: with SMTP id e20mr9591383otp.272.1578602517222; Thu, 09 Jan 2020 12:41:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578602517; cv=none; d=google.com; s=arc-20160816; b=sI/3W9WP9LOypFs5oSI3lyOXbbjpkVTaejdriFSX2Rwzr/Z6cgl2385LvGEAxgOicA rfMxOAlleJ50LDtJObsUru3xKh0pR2Hs1OtuqaGPsxRy3LkbLAK8+UwWcphrjIcazOLY mqqE0mMqVnVkQfyms7w/WWg60uVwqY71lm81sieWKIxSj9I2RBVNtbz9TXWlChTqN3BI 7kATyDNnoahFxK++foe8N6hu9jUzj+8mOQyRdLPzp3X5IU7ofy20ReB1Z06hi29z7Lyc JhyvH2Hwv/H0EsKHTCIg5BstyQfug7IjbP4JqT3NjfjLDHtEXpw0XDgW7flkAJo5olB1 osvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=Ir69RLNP2nqg7KKZp8n2kx6TPd7dWtIe3ZD0LK7++x4=; b=Vg16JThNvTS+eQYnUcKWL7D8667jk85lsJzb3HUFQdvLO4AZhkp65WC1T4/CaweYSZ NwYmrgt68qhtzA0cim0bwG3+fHBDaKBlV0NK52QKVya24rbRomUjS010Eui77DqLFUOJ L89JHTLQMATKJBchVC+MbeMtcaoQkVKhVEwewKegQcmyoZpQJiE5ypk5rMDH0trwx/Nq GUH5+qjs/eAjs4gMLnUpB102tXXCmyDZ8FJ87Q7DlP286Vq2lpD2Hm9xhkGgGJ9lhHve qfI1i8RC55QUnXiMzpYQrEXSlKt25r87UqKhYI+jRAlMr1UszSWRgckZZ69gU4swcA8q QKLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=t6jaL5GY; 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 o12si4174674oie.150.2020.01.09.12.41.45; Thu, 09 Jan 2020 12:41:57 -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=@kernel.org header.s=default header.b=t6jaL5GY; 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 S2388460AbgAISX3 (ORCPT + 99 others); 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: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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