Re: [PATCH bpf-next 1/2] libbpf: normalize PT_REGS_xxx() macro definitions

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

 





On 12/22/21 1:39 PM, Andrii Nakryiko wrote:
Refactor PT_REGS macros definitions in  bpf_tracing.h to avoid excessive
duplication. We currently have classic PT_REGS_xxx() and CO-RE-enabled
PT_REGS_xxx_CORE(). We are about to add also _SYSCALL variants, which
would require excessive copying of all the per-architecture definitions.

Instead, separate architecture-specific field/register names from the
final macro that utilize them. That way for upcoming _SYSCALL variants
we'll be able to just define x86_64 exception and otherwise have one
common set of _SYSCALL macro definitions common for all architectures.

Cc: Kenta Tada <Kenta.Tada@xxxxxxxx>
Cc: Hengqi Chen <hengqi.chen@xxxxxxxxx>
Cc: Björn Töpel <bjorn@xxxxxxxxxx>
Cc: Ilya Leoshkevich <iii@xxxxxxxxxxxxx>
Signed-off-by: Andrii Nakryiko <andrii@xxxxxxxxxx>

I tried my best to compare old and new sources. Except "const volatile struct user_pt_regs *" becomes "const struct user_pt_regs *", I didn't
spot any other semantic differences. Agree that "volatile" is not really
needed here. So

Acked-by: Yonghong Song <yhs@xxxxxx>



[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