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=-3.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,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 B3674C2D0E7 for ; Thu, 26 Mar 2020 01:52:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 875C320714 for ; Thu, 26 Mar 2020 01:52:03 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="lAaBD/0C" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727690AbgCZBwC (ORCPT ); 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-Google-Smtp-Source: ADFU+vsEuvmfB/mTYFYnlUUT9EbTD50gewArOBTrfX+z1pFq5CwoE9ICI5sfKWceBFPTzgpb4mUU21kl1UL26iw54P8= 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 > [...]