Commit ff358ada authored by Matt Bobrowski's avatar Matt Bobrowski Committed by Alexei Starovoitov
Browse files

selftests/bpf: add negative tests for new VFS based BPF kfuncs



Add a bunch of negative selftests responsible for asserting that the
BPF verifier successfully rejects a BPF program load when the
underlying BPF program misuses one of the newly introduced VFS based
BPF kfuncs.

The following VFS based BPF kfuncs are extensively tested within this
new selftest:

* struct file *bpf_get_task_exe_file(struct task_struct *);
* void bpf_put_file(struct file *);
* int bpf_path_d_path(struct path *, char *, size_t);

Acked-by: default avatarChristian Brauner <brauner@kernel.org>
Acked-by: default avatarSong Liu <song@kernel.org>
Signed-off-by: default avatarMatt Bobrowski <mattbobrowski@google.com>
Link: https://lore.kernel.org/r/20240731110833.1834742-3-mattbobrowski@google.com


Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
parent d08e2045
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment