eBPF-based security platform
bpf: trim the unload header and the identity comment
Daniel Borkmann37c49b6a6b62
diff --git a/bpf/lib/shirudo_decoder.h b/bpf/lib/shirudo_decoder.hindex bf42d788..20937698 100644--- a/bpf/lib/shirudo_decoder.h+++ b/bpf/lib/shirudo_decoder.h@@ -2,8 +2,7 @@/** Copyright (c) 2026 Authors of shirudo*- * BPF-side decoder manifest ABI. Include after vmlinux.h so __u16/__u32- * are available.+ * The decoder manifest a BPF program declares in .rodata.*/#ifndef SHIRUDO_DECODER_Hdiff --git a/bpf/lib/shirudo_identity.h b/bpf/lib/shirudo_identity.hindex 3dada950..e3435df8 100644--- a/bpf/lib/shirudo_identity.h+++ b/bpf/lib/shirudo_identity.h@@ -10,11 +10,8 @@#define SHIRUDO_BPF_IDENTITY_H/*- * Frozen identity record, populated by `shirudo init` before the programs- * attach: the private bpffs superblock device, the (dev, ino) of shirudo's- * own executable, and the serial and kind (enum bpf_sig_keyring) of the- * sealed keyring a signed load must have been verified against. Must match- * struct shirudo_identity in util/identity.h byte-for-byte.+ * Populated by init before the programs attach. Must match struct+ * shirudo_identity in util/identity.h byte for byte.*/#define SHIRUDO_IDENTITY_KEYS_MAX 16diff --git a/bpf/unload.c b/bpf/unload.cindex a6ad17cd..0ca64e6a 100644--- a/bpf/unload.c+++ b/bpf/unload.c@@ -2,19 +2,8 @@/** Copyright (c) 2026 Authors of shirudo*- * Signed UNLOAD-directive template. shirudo-build --unload patches- * shirudo_unload_params via libbpf bpf_map__set_initial_value() on- * the synthetic .rodata map, then runs gen_loader + CMS sign on- * this object. Loading this signed program is the unload- * authorization gate (the kernel verifies its CMS signature against- * the keyring); the body returns 0 because the actual work runs in- * userspace today -- shirudo VFS-unlinks the pin to detach, and does- * the payload_mismatch compare against the bpf2-protected- * security.bpf.shirudo.payload pin xattr. The signature-covered- * expected_sha256 in .rodata is the value a future in-kernel- * detach + compare would use once bpf_sys_bpf gains the- * BPF_LINK_DETACH / BPF_OBJ_GET ops; until then- * it documents intent and pins the value into the signature.+ * The signed unload directive: loading it is the authorization, the+ * detach itself still runs in userspace.*/#include "vmlinux.h"