On Tue, Jul 28, 2020 at 5:15 AM Ilya Leoshkevich <iii@xxxxxxxxxxxxx> wrote: > > Yet another adaptation to commit 0ebeea8ca8a4 ("bpf: Restrict > bpf_probe_read{, str}() only to archs where they work") that makes more > samples compile on s390. > > Signed-off-by: Ilya Leoshkevich <iii@xxxxxxxxxxxxx> > --- Sorry, we can't do this yet. This will break on older kernels that don't yet have bpf_probe_read_kernel() implemented. Met and Yonghong are working on extending a set of CO-RE relocations, that would allow to do bpf_probe_read_kernel() detection on BPF side, transparently for an application, and will pick either bpf_probe_read() or bpf_probe_read_kernel(). It should be ready soon (this or next week, most probably), though it will have dependency on the latest Clang. But for now, please don't change this. > tools/lib/bpf/bpf_core_read.h | 51 ++++++++++++++++++----------------- > tools/lib/bpf/bpf_tracing.h | 15 +++++++---- > 2 files changed, 37 insertions(+), 29 deletions(-) > [...]