Skip to content

Commit

Permalink
libbpf: Fix BPF_PROBE_READ{_STR}_INTO() on s390x
Browse files Browse the repository at this point in the history
BPF_PROBE_READ_INTO() and BPF_PROBE_READ_STR_INTO() should map to
bpf_probe_read() and bpf_probe_read_str() respectively in order to work
correctly on architectures with !ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE.

Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Link: https://lore.kernel.org/r/20230128000650.1516334-24-iii@linux.ibm.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
  • Loading branch information
Ilya Leoshkevich authored and Alexei Starovoitov committed Jan 28, 2023
1 parent 25c76ed commit 42fae97
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/lib/bpf/bpf_core_read.h
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ enum bpf_enum_value_kind {

/* Non-CO-RE variant of BPF_CORE_READ_INTO() */
#define BPF_PROBE_READ_INTO(dst, src, a, ...) ({ \
___core_read(bpf_probe_read, bpf_probe_read, \
___core_read(bpf_probe_read_kernel, bpf_probe_read_kernel, \
dst, (src), a, ##__VA_ARGS__) \
})

Expand Down Expand Up @@ -400,7 +400,7 @@ enum bpf_enum_value_kind {

/* Non-CO-RE variant of BPF_CORE_READ_STR_INTO() */
#define BPF_PROBE_READ_STR_INTO(dst, src, a, ...) ({ \
___core_read(bpf_probe_read_str, bpf_probe_read, \
___core_read(bpf_probe_read_kernel_str, bpf_probe_read_kernel, \
dst, (src), a, ##__VA_ARGS__) \
})

Expand Down

0 comments on commit 42fae97

Please sign in to comment.