On Tue, Feb 18, 2025 at 08:54:03AM +0100, Michal Suchánek wrote: > Hello, > > how does this happen? > > On Tue, Feb 18, 2025 at 12:48:01PM +0800, Shung-Hsi Yu wrote: > > Due to include chain (below), powerpc's asm-compat.h is part of UAPI, ... > > include/uapi/linux/ptrace.h > > arch/powerpc/include/asm/ptrace.h > > There is arch/powerpc/include/uapi/asm/ptrace.h > > and if the installed header is used this is what should be included. > > That does no include other asm headers.
Ah. Then asm-compat.h not, my bad. I thought bcc[1] was pulling the kernel headers like a userspace program, but it's actually pulling them in as if building a kernel module, thus include path has arch/powerpc/include/asm/ptrace.h before arch/powerpc/include/uapi/asm/ptrace.h[2]. > Thanks > > Michal ... 1: https://github.com/iovisor/bcc 2: https://github.com/iovisor/bcc/blob/5bc97bb/src/cc/frontends/clang/kbuild_helper.cc#L81-L120