On Tue, 2024-01-16 at 10:40 -0800, Alexei Starovoitov wrote: [...] > The changes to all three make sense, but they might cause regressions > if they are not synchronized with new llvm. > cilium/tetragon can control the llvm version to some degree, but not selftests. > Should we add clang macro like __BPF_CPU_VERSION__ and ifdef > different asm style depending on that? > I suspect this "(short)" workaround will still be needed for quite > some time while people upgrade to the latest llvm. > something like __BPF_STRICT_ASM_CONSTRAINT__ ? > Maybe a flag too that can revert to old behavior without warnings? After my changes selftests are passing both with old and new constraint semantics, so such macro definitions / compiler flags are not necessary for selftests. (Although, I have not yet checked the codegen difference, so the absence of the "(short)" thing might be visible there). As for Cilium / Tetragon: I checked verification of the object files with both LLVM versions, but adding compiler flag might make sense. Maybe compiler users should comment?