Skip to content

Commit

Permalink
selftest/bpf: Fix vfs_link kprobe definition
Browse files Browse the repository at this point in the history
Since commit 6521f89 ("namei: prepare for idmapped mounts")
vfs_link's prototype was changed, the kprobe definition in
profiler selftest in turn wasn't updated. The result is that all
argument after the first are now stored in different registers. This
means that self-test has been broken ever since. Fix it by updating the
kprobe definition accordingly.

Signed-off-by: Nikolay Borisov <nborisov@suse.com>
  • Loading branch information
lorddoskias authored and Nobody committed Mar 31, 2022
1 parent e341ece commit 5113cd0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tools/testing/selftests/bpf/progs/profiler.inc.h
Original file line number Diff line number Diff line change
Expand Up @@ -826,8 +826,9 @@ int kprobe_ret__do_filp_open(struct pt_regs* ctx)

SEC("kprobe/vfs_link")
int BPF_KPROBE(kprobe__vfs_link,
struct dentry* old_dentry, struct inode* dir,
struct dentry* new_dentry, struct inode** delegated_inode)
struct dentry* old_dentry, struct user_namespace *mnt_userns,
struct inode* dir, struct dentry* new_dentry,
struct inode** delegated_inode)
{
struct bpf_func_stats_ctx stats_ctx;
bpf_stats_enter(&stats_ctx, profiler_bpf_vfs_link);
Expand Down

0 comments on commit 5113cd0

Please sign in to comment.