Question: CO-RE-enabled PT_REGS macros give strange results

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dear BPF community,

I'm developing a perf_event BPF program which reads some register
values (frame and instruction pointers in particular) from the context
provided to it. I found that CO-RE-enabled PT_REGS macros give results
different from the results of the usual PT_REGS  macros. I run the
program on the same system I compiled it on, and so I cannot
understand why the results differ and which ones should I use?

>From my tests, the results of the usual macros are the correct ones
(e.g. I can symbolize the instruction pointers I get this way), but
since I try to follow the CO-RE principle, it seems like I should be
using the CO-RE-enabled variants instead.

I did some experiments and found out that it is the
bpf_probe_read_kernel part of the CO-RE-enabled PT_REGS macros that
change the results and not __builtin_preserve_access_index. But I
still don't get why exactly it changes the results.

Thank you in advance,
Timofei




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux