bpf_verify_pkcs7_signature(9)
π NAME
bpf_verify_pkcs7_signature β verify a PKCS#7 signature. That's it, that's the whole job. It checks a signature and tells you if it's valid. Slay.
This is bpf_verify_pkcs7_signature(9) btw, from the Kernel API Manual β put some respect on the section number.
β¨ SYNOPSIS
__bpf_kfunc int bpf_verify_pkcs7_signature (const struct bpf_dynptr
*data_p , const struct bpf_dynptr *sig_p , struct bpf_key
*trusted_keyring );
Look at that signature. Literally three pointers and a dream. __bpf_kfunc int, boom, done.
π«Ά ARGUMENTS
Okay bestie, here's who's who in this little friend group:
data_pβ the data you're verifying. The actual thing. The moment.sig_pβ the signature of the data. Like, the data's little handwritten autograph.trusted_keyringβ a keyring holding the keys that are trusted for signature verification. This is the VIP list. If your key isn't on the list, it's not getting in. π ββοΈ
πΈ DESCRIPTION
So here's the vibe check: this function verifies the PKCS#7 signature sig_ptr against the supplied data_ptr, using keys that live in a keyring referenced by trusted_keyring.
(And yes, the args are named data_p and sig_p up in ARGUMENTS but the description says sig_ptr and data_ptr β that's just how the page is written, I'm not out here fixing anything, I'm just reporting. π)
The energy: data comes in, signature comes in, keyring comes in, and the function is like "do these match, and do I trust the key that made this signature?" If everyone's legit, it's a whole πβ¨ moment. Obsessed.
π RETURN
0on success β the good timeline π- a negative value on error β the bad timeline π
That's it. No secret third thing. Zero or negative. Iconic in its simplicity.
π¦ SEE ALSO
Kernel file: ./kernel/bpf/helpers.c β go read it, it's where the lore lives.
And now, the full squad roll call, in order, no gatekeeping, all of them π:
bpf_obj_new(9)bpf_percpu_obj_new(9)bpf_obj_drop(9)bpf_percpu_obj_drop(9)bpf_refcount_acquire(9)bpf_list_push_front(9)bpf_list_push_back(9)bpf_rbtree_add(9)bpf_task_acquire(9)bpf_task_release(9)bpf_cgroup_acquire(9)bpf_cgroup_release(9)bpf_cgroup_ancestor(9)bpf_cgroup_from_id(9)bpf_task_under_cgroup(9)bpf_task_get_cgroup1(9)bpf_task_from_pid(9)bpf_task_from_vpid(9)bpf_dynptr_slice(9)bpf_dynptr_slice_rdwr(9)bpf_dynptr_copy(9)bpf_dynptr_memset(9)bpf_iter_bits_new(9)bpf_iter_bits_next(9)bpf_iter_bits_destroy(9)bpf_copy_from_user_str(9)bpf_copy_from_user_task_str(9)bpf_strcmp(9)bpf_strcasecmp(9)bpf_strnchr(9)bpf_strchr(9)bpf_strchrnul(9)bpf_strrchr(9)bpf_strnlen(9)bpf_strlen(9)bpf_strspn(9)bpf_strcspn(9)bpf_strstr(9)bpf_strcasestr(9)bpf_strnstr(9)bpf_strncasestr(9)bpf_lookup_user_key(9)bpf_lookup_system_key(9)bpf_key_put(9)bpf_task_work_schedule_signal(9)bpf_task_work_schedule_resume(9)bpf_timer_cancel_async(9)
Forty-six besties and every single one of them matters. fr fr. π
That's the whole page, bestie. Courtesy of the fine people at ./kernel/bpf, dated October 2026, living in section 9 of the Kernel API Manual. Read it, love it, verify those signatures. mwah π«Ά
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms