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 5553EC33CB3 for ; Wed, 15 Jan 2020 17:24:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 24D4824656 for ; Wed, 15 Jan 2020 17:24:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1579109061; bh=b+aRmNZSG+rZiH8nNM8CW6uxu+f2JgSIa4gTfT3WMDY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=xbzNp4ZqwIX2Uk95zp0e8cd/Ti+fxUokRRWO+xt7ldBIdZnQFrqZVbWYqiA/V7nNr rUTSK3L7Id02BFWDmrfmqAOOzqndgcuaIHwoZUxQc8zeq2t4n3CIPXNni7jUD2lRzQ n5erBLIqtTR2MguNnkvJajxcK/t/Jset3rFnY0DQ= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729014AbgAORYU (ORCPT ); Wed, 15 Jan 2020 12:24:20 -0500 Received: from mail.kernel.org ([198.145.29.99]:51408 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726574AbgAORYU (ORCPT ); Wed, 15 Jan 2020 12:24:20 -0500 Received: from localhost (unknown [217.68.49.72]) (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 C77CB207FF; Wed, 15 Jan 2020 17:24:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1579109059; bh=b+aRmNZSG+rZiH8nNM8CW6uxu+f2JgSIa4gTfT3WMDY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=wicVpOCcLbMKoUychULSEd3NuKHeuWqbnKMMcxDVCvgzlbz3fTIH1nrV+7Kp+RJo8 qvIhW61lPlz6rFGByKDshXIpidYU7Uv5kfAMIlu2vy6e4r8gkAODwJd7HF1/a/4m/U Aadtgd4vG0UgbcRavBsgdulm/ESRdgJ0qA4fMCb8= Date: Wed, 15 Jan 2020 18:24:17 +0100 From: Greg Kroah-Hartman To: KP Singh Cc: linux-kernel@vger.kernel.org, bpf@vger.kernel.org, linux-security-module@vger.kernel.org, Alexei Starovoitov , Daniel Borkmann , James Morris , Kees Cook , 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 Subject: Re: [PATCH bpf-next v2 06/10] bpf: lsm: Implement attach, detach and execution Message-ID: <20200115172417.GC4127163@kroah.com> References: <20200115171333.28811-1-kpsingh@chromium.org> <20200115171333.28811-7-kpsingh@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200115171333.28811-7-kpsingh@chromium.org> Sender: owner-linux-security-module@vger.kernel.org Precedence: bulk List-ID: On Wed, Jan 15, 2020 at 06:13:29PM +0100, KP Singh wrote: > From: KP Singh > > JITed BPF programs are used by the BPF LSM as dynamically allocated > security hooks. arch_bpf_prepare_trampoline handles the > arch_bpf_prepare_trampoline generates code to handle conversion of the > signature of the hook to the BPF context and allows the BPF program to > be called directly as a C function. > > The following permissions are required to attach a program to a hook: > > - CAP_SYS_ADMIN to load the program > - CAP_MAC_ADMIN to attach it (i.e. to update the security policy) You forgot to list "GPL-compatible license" here :) Anyway, looks good to me: Reviewed-by: Greg Kroah-Hartman