-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Run-time failure on ppc64le: invalid input constraint 'YZ<>' in asm #5172
Comments
Thanks for reporting.
They are supposed to be removed during arch specific compilation (powerpc) since nobody uses those functions but apparently they are still there for later bpf backend code generation. I do not have environments to debug this and hopefully somebody else could help take a look if possible. |
In arch/powerpc/include/asm/asm-compat.h, we have :: Can we compile the kernel headers in bcc setting CONFIG_CC_IS_CLANG, we get correct DS_FORM? |
You can add
|
These are kernel-internal headers which are configured for use with the compiler that was used to build the kernel, and for that compiler YZ<> is the correct constraint. However, bcc pulls that kernel-internal header into a different project, built with a different compiler. That's why the build fails. This is outside of what the kernel build system supports. |
Due to include chain (below), powerpc's asm-compat.h is part of UAPI, thus it should use the __clang__ macro to directly detect whether Clang is used rather then relying on the kernel config setting. The later is unreliable because the userspace tools that uses UAPI may be compile with a different compiler than the one used for the kernel, leading to incorrect constrain selection (see link for an example of such). include/uapi/linux/ptrace.h arch/powerpc/include/asm/ptrace.h arch/powerpc/include/asm/paca.h arch/powerpc/include/asm/atomic.h arch/powerpc/include/asm/asm-compat.h Link: iovisor/bcc#5172 Signed-off-by: Shung-Hsi Yu <[email protected]>
Would it make sense to define |
jfyi, test run of
cpudist
from 0.31.0 started to fail on Linux v6.12.5 on ppc64le with:This test was working OK on Linux v6.10.6 (I'm not implying that kernel version difference is the cause of failure though).
This architecture is low priority for us, thus I'm just disabling build of bcc package on ppc64le for ALT Linux, but this failure might interesting for you, so I'm reporting it here.
The text was updated successfully, but these errors were encountered: