BPF List
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Blaise Boscaccy" <bboscaccy@linux.microsoft.com>
Cc: bpf@vger.kernel.org
Subject: Re: [v6 04/10] lsm: framework for BPF integrity verification
Date: Wed, 29 Apr 2026 22:24:30 +0000	[thread overview]
Message-ID: <20260429222431.B2685C19425@smtp.kernel.org> (raw)
In-Reply-To: <20260429191431.2345448-5-bboscaccy@linux.microsoft.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] The newly added LSM hooks `bpf_prog_load_integrity` and `bpf_prog_load_post_integrity` are missing from the `sleepable_lsm_hooks` BTF set.
--

commit 8148d31126f70fa43314056c3dc696e4fcd7470d
Author: Paul Moore <paul@paul-moore.com>

lsm: framework for BPF integrity verification

This commit adds a new LSM hook and two new callbacks to support BPF program
integrity verification. It allows administrators to select additional
integrity verification mechanisms through the LSM framework.

Link: https://lore.kernel.org/linux-security-module/CAHC9VhTQ_DR=ANzoDBjcCtrimV7XcCZVUsANPt=TjcvM4d-vjg@mail.gmail.com/

> diff --git a/include/linux/lsm_hook_defs.h b/include/linux/lsm_hook_defs.h
> index 8c42b4bde09c..4971d3c36d5b 100644
> --- a/include/linux/lsm_hook_defs.h
> +++ b/include/linux/lsm_hook_defs.h
> @@ -434,6 +434,11 @@ LSM_HOOK(int, 0, bpf_prog, struct bpf_prog *prog)
>  LSM_HOOK(int, 0, bpf_map_create, struct bpf_map *map, union bpf_attr *attr,
>  	 struct bpf_token *token, bool kernel)
>  LSM_HOOK(void, LSM_RET_VOID, bpf_map_free, struct bpf_map *map)
> +LSM_HOOK(int, 0, bpf_prog_load_post_integrity, struct bpf_prog *prog,
> +	 union bpf_attr *attr, struct bpf_token *token, bool kernel,
> +	 const struct lsm_id *lsmid, enum lsm_integrity_verdict verdict)
> +LSM_HOOK(int, 0, bpf_prog_load_integrity, struct bpf_prog *prog,
> +	 union bpf_attr *attr, struct bpf_token *token, bool kernel)

Should these two new hooks be added to the sleepable_lsm_hooks BTF set in
kernel/bpf/bpf_lsm.c?

Since they execute in the same context as the existing bpf_prog_load hook
(which is a known sleepable context), omitting them restricts any BPF LSM
program attaching to them to a non-sleepable context.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260429191431.2345448-1-bboscaccy@linux.microsoft.com?part=4

  reply	other threads:[~2026-04-29 22:24 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-29 19:14 [v6 00/10] Reintroduce Hornet LSM Blaise Boscaccy
2026-04-29 19:14 ` [v6 01/10] crypto: pkcs7: add flag for validated trust on a signed info block Blaise Boscaccy
2026-04-29 21:20   ` sashiko-bot
2026-04-29 19:14 ` [v6 02/10] crypto: pkcs7: add ability to extract signed attributes by OID Blaise Boscaccy
2026-04-29 21:42   ` sashiko-bot
2026-04-29 19:14 ` [v6 03/10] crypto: pkcs7: add tests for pkcs7_get_authattr Blaise Boscaccy
2026-04-29 22:03   ` sashiko-bot
2026-04-29 19:14 ` [v6 04/10] lsm: framework for BPF integrity verification Blaise Boscaccy
2026-04-29 22:24   ` sashiko-bot [this message]
2026-04-29 19:14 ` [v6 05/10] lsm: security: Add additional enum values for bpf integrity checks Blaise Boscaccy
2026-04-29 19:14 ` [v6 06/10] security: Hornet LSM Blaise Boscaccy
2026-04-29 23:18   ` sashiko-bot
2026-04-29 19:14 ` [v6 07/10] hornet: Introduce gen_sig Blaise Boscaccy
2026-04-29 23:32   ` sashiko-bot
2026-04-29 19:14 ` [v6 08/10] hornet: Add a light skeleton data extractor scripts Blaise Boscaccy
2026-04-29 23:47   ` sashiko-bot
2026-04-29 19:14 ` [v6 09/10] selftests/hornet: Add a selftest for the Hornet LSM Blaise Boscaccy
2026-04-29 23:57   ` sashiko-bot
2026-04-29 19:14 ` [v6 10/10] ipe: Add BPF program load policy enforcement via Hornet integration Blaise Boscaccy
2026-04-30  0:31   ` sashiko-bot
2026-05-04 23:52   ` Fan Wu
2026-05-07 19:19 ` [v6 00/10] Reintroduce Hornet LSM Paul Moore
2026-05-08 18:03   ` Blaise Boscaccy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260429222431.B2685C19425@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=bboscaccy@linux.microsoft.com \
    --cc=bpf@vger.kernel.org \
    --cc=sashiko@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox