Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1721132ybb; Thu, 26 Mar 2020 06:12:39 -0700 (PDT) X-Google-Smtp-Source: ADFU+vtoi1IV44lpQZES3ODv7UoMd7GAsob3pyl6ewkJU5s02s/99HszBUPYV4D0hw7Db127dcqu X-Received: by 2002:a05:6808:8db:: with SMTP id k27mr1730927oij.175.1585228359270; Thu, 26 Mar 2020 06:12:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585228359; cv=none; d=google.com; s=arc-20160816; b=oVVrcAYDX19yz/a2mY9GQXA/A0HfqW2+bE9v0Ny0sL8ZOTQdBjMXFl0ZONFHYZZJlW a0JsejsfjpjZu1/mpdsWFDuu2hL8c2AuMoeffHVwkiEz2K21PE7/wP7+Ro69ZIiixbuC tToqgAWZIMdIrn6mje2cJTq+WdadscQfGSgCfxz/C95I+j/YiJ0ILt4P8XfCgP43/iQ8 fWiRtxW5EZLCsp5WycwS/tIdqgiDkbBYwu2AYxmY5WdGvGapzXxSo1wDmpMjPRHUjLRf Sg26/9kcENNzmxjL1GxHfOO5nyCqKShYTvFU7aGg00CisQbrumHfndxT/viifr7OietF 0VUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:date:from:dkim-signature; bh=fYD1onDikuCT88dA5DWTTI0UuhLtnw/htdevMIVPd9s=; b=xKWEgjrJZovXLfS8G/MFhnfg1H7TbgvLObfTAkY/7MsqTwgXBInC7l/YAcfqR4eHhB 80D1PRia4/VU4ik9GylloE3uUrR+SIPlYenpa1Qd2L04c2D2deIhKfy7BbuvfGLCF4tf tp1cOOTk1JtNWRoLZNp5lHwh7tzE7UGG+6B5zt4V8TyJNgxI1Fz/r2ppWWea9Maza2uT qFjgxpKiypgJ+7VJqwxc6hcvQ4azJmjk6UoLFNqChKtv/pIke5BSen2O5cY0yd7st6EC OaL9sK+volHpARUWMPI1s56Df8wqrmNEXjr/v3ahQKCiY42IfcmLCXDN7SZ/ZacOXbxH +Nug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=SBr6DW5T; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o14si1050949otl.122.2020.03.26.06.12.24; Thu, 26 Mar 2020 06:12:39 -0700 (PDT) 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=@chromium.org header.s=google header.b=SBr6DW5T; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726175AbgCZNMG (ORCPT + 99 others); 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-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 > > > > [...]