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=-5.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable 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 C205FC2D0E8 for ; Thu, 26 Mar 2020 13:12:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9C6CD2076A for ; Thu, 26 Mar 2020 13:12:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="SBr6DW5T" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727473AbgCZNMG (ORCPT ); Thu, 26 Mar 2020 09:12:06 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:42115 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726260AbgCZNMG (ORCPT ); Thu, 26 Mar 2020 09:12:06 -0400 Received: by mail-wr1-f68.google.com with SMTP id h15so7687007wrx.9 for ; Thu, 26 Mar 2020 06:12:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:date:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=fYD1onDikuCT88dA5DWTTI0UuhLtnw/htdevMIVPd9s=; b=SBr6DW5T+1V0x5iQLwqAaWSO25Rdxc8tXhULBX/bVijGFSDxmpoXqFVFnH5TrL2kG0 u3v0fs+akUJTQ2RGHrLQGMzCWoi8tpcrJn0prdInLINCiMuritNDPDf7FqpSYQGe2xWe hPI2gQ6d+etxyoc1nowSU5Oq+RYuE3OIjyPH0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=fYD1onDikuCT88dA5DWTTI0UuhLtnw/htdevMIVPd9s=; b=UW8AZj6Mqq8vAaC8cY2ZN8/D3wzkwzyay+Vw49uJK2Nj4B5zeWijPtmKC7VJ71e5EM vaeQrNVO9PrTHWruaMjdnwet9TGSxbytLhaAcA+oS4hBoSlxxLTpPMzUHrOOrbvkRmGx 7WlrXmlv/VmtEL8Bm1SKTHxnNC1Hrs+K8dPs6Oa5r0SAuFmhb3dmhVkmhlbEFL/K1oVo VLifCR1WxR/TLYMrw+FNXO3Dnq6044BnxYZNvoNq+eMbnOVJu9fHbQALQLA+0MAhp+Fj TZswapgqYQWUt070MMBeE/dvB8Bf8Tiijmjzj7A4k7xGBqaRHJfwUHtWoLNBTe+XOVHm yCJg== X-Gm-Message-State: ANhLgQ2wDqcLg0dqM7U+8fTDkdId6s7SxwncLT8EeliUOaE1NNKmHVdb IZ+68LRN/FoxaXNTllItaIo+Gw== X-Google-Smtp-Source: ADFU+vsgpQLD/kDSgky4dJcwopfiL6zM9Z6fEVRTGk4Y2ZMQ2fUbqvWhoxQPHg238aypcNRoFGZS/w== X-Received: by 2002:adf:efc9:: with SMTP id i9mr8872802wrp.23.1585228324428; Thu, 26 Mar 2020 06:12:04 -0700 (PDT) Received: from chromium.org (77-56-209-237.dclient.hispeed.ch. [77.56.209.237]) by smtp.gmail.com with ESMTPSA id 195sm3563080wmb.8.2020.03.26.06.11.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Mar 2020 06:12:03 -0700 (PDT) From: KP Singh X-Google-Original-From: KP Singh Date: Thu, 26 Mar 2020 14:11:58 +0100 To: Andrii Nakryiko Cc: open list , bpf , linux-security-module@vger.kernel.org, Brendan Jackman , Florent Revest , Thomas Garnier , Yonghong Song , Alexei Starovoitov , Daniel Borkmann , James Morris , Kees Cook , Paul Turner , Jann Horn , Florent Revest , Brendan Jackman , Greg Kroah-Hartman Subject: Re: [PATCH bpf-next v6 1/8] bpf: Introduce BPF_PROG_TYPE_LSM Message-ID: <20200326131158.GA8575@chromium.org> References: <20200325152629.6904-1-kpsingh@chromium.org> <20200325152629.6904-2-kpsingh@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 25-Mär 18:51, Andrii Nakryiko wrote: > On Wed, Mar 25, 2020 at 8:27 AM KP Singh wrote: > > > > From: KP Singh > > > > Introduce types and configs for bpf programs that can be attached to > > LSM hooks. The programs can be enabled by the config option > > CONFIG_BPF_LSM. > > > > Signed-off-by: KP Singh > > Reviewed-by: Brendan Jackman > > Reviewed-by: Florent Revest > > Reviewed-by: Thomas Garnier > > Acked-by: Yonghong Song > > --- > > Looks good to me, so please add by ack, but I think it would be easier > to review if this was combined with patch #4, which adds verifier > support and kernel/bpf/syscall.c support. On its own this patch just > adds random unused stuff. The ordering becomes tricky as we are using the CONFIG_BPF_LSM in "bpf: lsm: provide attachment points for BPF LSM programs". If it's not too much trouble, I would appreciate if we can keep the order. > > Acked-by: Andrii Nakryiko Added your ack Thanks :) - KP > > > MAINTAINERS | 1 + > > include/linux/bpf.h | 3 +++ > > include/linux/bpf_types.h | 4 ++++ > > include/uapi/linux/bpf.h | 2 ++ > > init/Kconfig | 12 ++++++++++++ > > kernel/bpf/Makefile | 1 + > > kernel/bpf/bpf_lsm.c | 17 +++++++++++++++++ > > kernel/trace/bpf_trace.c | 12 ++++++------ > > tools/include/uapi/linux/bpf.h | 2 ++ > > tools/lib/bpf/libbpf_probes.c | 1 + > > 10 files changed, 49 insertions(+), 6 deletions(-) > > create mode 100644 kernel/bpf/bpf_lsm.c > > > > [...]