From: Blaise Boscaccy <bboscaccy@linux.microsoft.com>
To: "Paul Moore" <paul@paul-moore.com>, "Fan Wu" <wufan@kernel.org>,
"Blaise Boscaccy" <bboscaccy@linux.microsoft.com>,
linux-security-module@vger.kernel.org
Subject: [PATCH 1/3] hornet: log map hash check failures in prog map validation
Date: Tue, 2 Jun 2026 13:23:20 -0700 [thread overview]
Message-ID: <20260602202336.3579863-2-bboscaccy@linux.microsoft.com> (raw)
In-Reply-To: <20260602202336.3579863-1-bboscaccy@linux.microsoft.com>
Add a pr_notice() before returning -EPERM when
hornet_check_prog_maps() fails to find a matching map hash.
This makes policy denials observable in kernel logs and improves
triage/debuggability of rejected BPF program loads without changing
enforcement behavior.
Signed-off-by: Blaise Boscaccy <bboscaccy@linux.microsoft.com>
---
security/hornet/hornet_lsm.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/security/hornet/hornet_lsm.c b/security/hornet/hornet_lsm.c
index eeb422db1092d..fe133a0e8a11a 100644
--- a/security/hornet/hornet_lsm.c
+++ b/security/hornet/hornet_lsm.c
@@ -221,6 +221,7 @@ static int hornet_check_prog_maps(struct bpf_prog *prog)
}
if (!found) {
mutex_unlock(&prog->aux->used_maps_mutex);
+ pr_notice("hornet: map hash check failed");
return -EPERM;
}
}
--
2.53.0
next prev parent reply other threads:[~2026-06-02 20:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-02 20:23 [PATCH 0/3] hornet: post-TOCTOU-fix cleanup and observability Blaise Boscaccy
2026-06-02 20:23 ` Blaise Boscaccy [this message]
2026-06-02 20:23 ` [PATCH 2/3] security, ipe: Remove LSM_INT_VERDICT_UNEXPECTED support Blaise Boscaccy
2026-06-02 20:23 ` [PATCH 3/3] hornet: update signing workflow documentation 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=20260602202336.3579863-2-bboscaccy@linux.microsoft.com \
--to=bboscaccy@linux.microsoft.com \
--cc=linux-security-module@vger.kernel.org \
--cc=paul@paul-moore.com \
--cc=wufan@kernel.org \
/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