[PATCH v5 03/12] libbpf: Implement SHA256 internal helper

Eric Biggers ebiggers at kernel.org
Sat Sep 27 21:03:45 UTC 2025


On Sun, Sep 21, 2025 at 03:31:24PM +0200, KP Singh wrote:
> Use AF_ALG sockets to not have libbpf depend on OpenSSL. The helper is
> used for the loader generation code to embed the metadata hash in the
> loader program and also by the bpf_map__make_exclusive API to calculate
> the hash of the program the map is exclusive to.
> 
> Acked-by: Andrii Nakryiko <andrii at kernel.org>
> Signed-off-by: KP Singh <kpsingh at kernel.org>

Nacked-by: Eric Biggers <ebiggers at kernel.org>

No more users of AF_ALG, please.  It's a huge mistake and has been
incredibly problematic over the years.

If you don't want to depend on a library, then just include some basic
SHA-256 code, similar to what I'm doing for iproute2 and SHA-1 at
https://lore.kernel.org/netdev/20250925225322.13013-1-ebiggers@kernel.org/.
I'd even be glad to write the patch for you, if you want.

- Eric



More information about the Linux-security-module-archive mailing list