linux/fs/verity
Daniel Xu cce4c40b96 bpf: treewide: Align kfunc signatures to prog point-of-view
Previously, kfunc declarations in bpf_kfuncs.h (and others) used "user
facing" types for kfuncs prototypes while the actual kfunc definitions
used "kernel facing" types. More specifically: bpf_dynptr vs
bpf_dynptr_kern, __sk_buff vs sk_buff, and xdp_md vs xdp_buff.

It wasn't an issue before, as the verifier allows aliased types.
However, since we are now generating kfunc prototypes in vmlinux.h (in
addition to keeping bpf_kfuncs.h around), this conflict creates
compilation errors.

Fix this conflict by using "user facing" types in kfunc definitions.
This results in more casts, but otherwise has no additional runtime
cost.

Note, similar to 5b268d1ebc ("bpf: Have bpf_rdonly_cast() take a const
pointer"), we also make kfuncs take const arguments where appropriate in
order to make the kfunc more permissive.

Signed-off-by: Daniel Xu <dxu@dxuuu.xyz>
Link: https://lore.kernel.org/r/b58346a63a0e66bc9b7504da751b526b0b189a67.1718207789.git.dxu@dxuuu.xyz
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
2024-06-12 11:01:31 -07:00
..
enable.c fsverity: improve documentation for builtin signature support 2023-06-20 22:47:55 -07:00
fsverity_private.h fsverity: remove hash page spin lock 2024-02-01 15:19:23 -08:00
hash_algs.c fsverity: explicitly check that there is no algorithm 0 2023-07-11 22:49:18 -07:00
init.c fsverity: use register_sysctl_init() to avoid kmemleak warning 2024-05-03 08:30:58 -07: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: treewide: Align kfunc signatures to prog point-of-view 2024-06-12 11:01:31 -07:00
open.c fsverity: remove hash page spin lock 2024-02-01 15:19:23 -08: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: remove hash page spin lock 2024-02-01 15:19:23 -08:00