Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1229719ybb; Wed, 25 Mar 2020 18:53:04 -0700 (PDT) X-Google-Smtp-Source: ADFU+vt9APpedDH7Xa+GXBTzme/LYBhuh504d6OdaWBhlZq3gWvNlYVkLTfjEqEuvI4EvtUqmukl X-Received: by 2002:a05:6830:1d4f:: with SMTP id p15mr4540585oth.38.1585187584082; Wed, 25 Mar 2020 18:53:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585187584; cv=none; d=google.com; s=arc-20160816; b=HtMC9ewirluutvtjQ8wd9FsGlsWtMrUMqDG73IddNJ7+XUhPaueyoo3zejBxAd/9+N TVNs3Rr873V+bjtYnqEd2BLFDYfitP/8wm2EO8vnku8Uc3l8yH82IZVIclrbg7vfRae1 nuMGA+vo+dX5An7E4Hg/pFf6BH0iBjGMu0AW3vsvnw4BCQOo2qOnbRoj6/E3LzHSkob2 oTgXBxqGir9pCwxb66rePUPc2NHJQ8lRMojCg619HKxW2agjbKLIL4HA1jkvO6vJA3H4 nEE3QIutMp9pJATUcyJARROHZac3ZcsVbKPChsvGjgZreJa2BB6OPliQvz4o6/GAxRU0 38AQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=y38zEgb3EH5u0ISLbX3L46cnC2XWupaDcY08yZB2pNc=; b=l/kACBsz0MFlYcU+CP/ABh40IokJxx5BLYBZxe00gGY7YM8JACtL0iNQhHdXvaQ8k6 bzgFK47EFMHBk9ij121Bt1mmXBGup9S9IYxvweVCrrzcxbYTz1+xSh8CJVxKv4AM++a9 WS/rDqNSlIJK4RhE3ZndjJAtXBdSP1iOdg/zototyHtutoG1jQ15sfu8NfQyT87Ztm0s EK9dbqClbs/AJEq69JE/5Z6hwQe/+gzxJuD+pY1I5tZLBYmFc6AB5MZhxwZmB/mmq3TF Lk6D/V5t0j9iZhWPNtWgHMUHe7Fd+clr9MV/IWz7uV90lBiF1UQKw530Lwqds47sXg7/ l1hA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="lAaBD/0C"; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r21si449057oth.185.2020.03.25.18.52.51; Wed, 25 Mar 2020 18:53:04 -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=@gmail.com header.s=20161025 header.b="lAaBD/0C"; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727682AbgCZBwC (ORCPT + 99 others); Wed, 25 Mar 2020 21:52:02 -0400 Received: from mail-qt1-f195.google.com ([209.85.160.195]:46906 "EHLO mail-qt1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727574AbgCZBwC (ORCPT ); Wed, 25 Mar 2020 21:52:02 -0400 Received: by mail-qt1-f195.google.com with SMTP id g7so4019193qtj.13; Wed, 25 Mar 2020 18:52:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=y38zEgb3EH5u0ISLbX3L46cnC2XWupaDcY08yZB2pNc=; b=lAaBD/0C9KD3FC5rERps9ALxqWaPr3p9p6GWkio2Ph34zVah9EUivfohLcXVxDIW8k qC+DhDMxP3eYiHC3ugZ73vGAXcfnXs8XEfGvdVt5oCt/W+IjZ2NojiGk2NpIEJxtx7vO c2scVpO98jYO/AK5np6/+QaBBAjSUo4Nlh+YmT5cLqx8fj26cwfUYLio9/ISH934psZ4 yzwIsXy1jFnnSBxKinBfISl8eBo4mmCCyqqkUtjYK8jf3KXWaAB407m9+iir7wpMrLpk btU6fM5hJhUB4OfnvUiaFm0XvIxOL58V79S2zlELbiUwFhK350pKRqYCeUoYbhaL34wk d9Sw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=y38zEgb3EH5u0ISLbX3L46cnC2XWupaDcY08yZB2pNc=; b=KpWulbrPCuxjlkGmccRjLTd+Pvggk0WXt909ZhZPtkFgcJv58qRm9AlquzSzAXsTaw j5q5B6wNRu9XUrO1mi0Zv3Ewr7ydw4GZSCJ6P2YTe/JnF/nn9JyWtXppd/bzOyaN4yf4 4cXa6dWXU+r3k1gVGfqkzAKR50C1rb8laNWCDbJX3lOyIyUrPbVmAhtRZdtVEkWhzqxR izYejf7K0s2VdTUBhvy4TOozWTs7EWL6oLp8NBPXWNb0M9x8yBeDku6sV0Cms86HtsSO R2TNX6MDihJvFC09E4+FI4biGsyzsSOO4cjHdp4/eKtIeo3tEw2LqxCmMj3r8U0s8yWK HEeQ== X-Gm-Message-State: ANhLgQ2ypscl2upjjGPVO/NtnaxURug/R2vHdblqiPy/6TtZJbHkIHO8 lKcMaw5xOquX11nvR2waYZa6+Db0Jxr6STXWZM4= X-Received: by 2002:ac8:1865:: with SMTP id n34mr5687310qtk.93.1585187521038; Wed, 25 Mar 2020 18:52:01 -0700 (PDT) MIME-Version: 1.0 References: <20200325152629.6904-1-kpsingh@chromium.org> <20200325152629.6904-2-kpsingh@chromium.org> In-Reply-To: <20200325152629.6904-2-kpsingh@chromium.org> From: Andrii Nakryiko Date: Wed, 25 Mar 2020 18:51:50 -0700 Message-ID: Subject: Re: [PATCH bpf-next v6 1/8] bpf: Introduce BPF_PROG_TYPE_LSM To: KP Singh 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 Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Acked-by: Andrii Nakryiko > 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 > [...]