linux-stable/fs/verity
Song Liu 67814c00de bpf, fsverity: Add kfunc bpf_get_fsverity_digest
fsverity provides fast and reliable hash of files, namely fsverity_digest.
The digest can be used by security solutions to verify file contents.

Add new kfunc bpf_get_fsverity_digest() so that we can access fsverity from
BPF LSM programs. This kfunc is added to fs/verity/measure.c because some
data structure used in the function is private to fsverity
(fs/verity/fsverity_private.h).

To avoid recursion, bpf_get_fsverity_digest is only allowed in BPF LSM
programs.

Signed-off-by: Song Liu <song@kernel.org>
Acked-by: Eric Biggers <ebiggers@google.com>
Link: https://lore.kernel.org/r/20231129234417.856536-3-song@kernel.org
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
2023-12-01 16:21:03 -08:00
..
enable.c fsverity: improve documentation for builtin signature support 2023-06-20 22:47:55 -07:00
fsverity_private.h bpf, fsverity: Add kfunc bpf_get_fsverity_digest 2023-12-01 16:21:03 -08:00
hash_algs.c fsverity: explicitly check that there is no algorithm 0 2023-07-11 22:49:18 -07:00
init.c bpf, fsverity: Add kfunc bpf_get_fsverity_digest 2023-12-01 16:21:03 -08:00
Kconfig fsverity: improve documentation for builtin signature support 2023-06-20 22:47:55 -07:00
Makefile fs-verity: add FS_IOC_READ_VERITY_METADATA ioctl 2021-02-07 14:51:11 -08:00
measure.c bpf, fsverity: Add kfunc bpf_get_fsverity_digest 2023-12-01 16:21:03 -08:00
open.c fsverity: simplify handling of errors during initcall 2023-07-11 22:49:18 -07:00
read_metadata.c fsverity: improve documentation for builtin signature support 2023-06-20 22:47:55 -07:00
signature.c fsverity: skip PKCS#7 parser when keyring is empty 2023-08-20 10:33:43 -07:00
verify.c fsverity: simplify handling of errors during initcall 2023-07-11 22:49:18 -07:00