]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
bpf: Fix build on architectures with special bpf_user_pt_regs_t
authorSong Liu <songliubraving@fb.com>
Fri, 24 Jul 2020 20:05:02 +0000 (13:05 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Sun, 26 Jul 2020 03:16:36 +0000 (20:16 -0700)
commit2b9b305fcdda1810bdffeb599361174eb2cd0b7c
tree6ac97431bb7987d56ee380f5dc0fb7eb52fb5587
parentdfcdf0e9ad2e006196986f363c99b2097aec5ef0
bpf: Fix build on architectures with special bpf_user_pt_regs_t

Architectures like s390, powerpc, arm64, riscv have speical definition of
bpf_user_pt_regs_t. So we need to cast the pointer before passing it to
bpf_get_stack(). This is similar to bpf_get_stack_tp().

Fixes: 03d42fd2d83f ("bpf: Separate bpf_get_[stack|stackid] for perf events BPF")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Song Liu <songliubraving@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20200724200503.3629591-1-songliubraving@fb.com
kernel/bpf/stackmap.c