Linux: changed binding to STB_GLOBAL

Created on 5 Nov 2020  路  10Comments  路  Source: ClangBuiltLinux/linux

https://reviews.llvm.org/D90108 broke LLVM_IAS=1 for x86_64, arm64, and arm. Filing an issue to track the fixes, since we'll need to track they all get fixed and backported to 4.19.

cc @MaskRay @jcai19 @samitolvanen

x86 patch is accepted: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/commit/?id=4d6ffa27b8e5116c0abb318790fd01d4e12d75e6
arm64 patch is in mainline: ec9d78070de986ecf581ea204fd322af4d2477ec
perf patch submitted: https://lore.kernel.org/lkml/[email protected]/

I think 32b arm is still a problem:

$ ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make LLVM=1 LLVM_IAS=1 -j71 
  AS      arch/arm/lib/memcpy.o
  AS      arch/arm/lib/memmove.o
  AS      arch/arm/lib/memset.o
<unknown>:0: error: memcpy changed binding to STB_GLOBAL
make[1]: *** [scripts/Makefile.build:364: arch/arm/lib/memcpy.o] Error 1
make[1]: *** Waiting for unfinished jobs....
<unknown>:0: error: memmove changed binding to STB_GLOBAL
<unknown>:0: error: memset changed binding to STB_GLOBAL
[ARCH] arm32 [ARCH] arm64 [ARCH] x86_64 [BUG] linux [PATCH] Accepted [TOOL] integrated-as

Most helpful comment

All 10 comments

I'll start fixing arm now...

The 32b ARM failure is currently linux-next specific, due to this commit: https://lore.kernel.org/linux-arm-kernel/[email protected]/

I don't know how to reference a commit in linux-next but not in mainline...
Just replied to "[PATCH 0/5 v16] KASan for Arm" by Linus Walleij (I could reply because @nathanchance kindly CCed it to clang-built-linux...)

I don't know how to reference a commit in linux-next but not in mainline...

Same way:

Fixes: <sha> ("<commit title>")

If the maintainer's tree is not stable (i.e. they rebase), they will usually squash the fix in or they will need to adjust the SHA for the fixes commit. If it is the former, the tag won't matter regardless and if it is the latter, it is their burden to fix up the SHA in the Fixes tag, not yours (because there is nothing you can do).

The vast majority of maintainers will not rebase so their SHAs are constant.

x86_64 patch has been merged into mainline: https://git.kernel.org/linus/4d6ffa27b8e5116c0abb318790fd01d4e12d75e6

backports sent for x86_64 on 5.4 and 4.19: https://lore.kernel.org/stable/CAKwvOdkK1LgLC4ChptzUTC45WvE9-Sn0OqtgF7-odNSw8xLTYA@mail.gmail.com/T/#u

I'll drop my temporary Linux 4.19 patch and merge this to avoid confusion.

arm64 patch ec9d78070de986ecf581ea204fd322af4d2477ec landed in v5.10-rc2.
63632bd5dd31485450834948155be98703aaccb7 in v5.9.5.
ca16a42f5f0da332a1756e7b48b228b6d3bcf24b in v5.4.76.
DNE in v4.19.y.

conflicts: 3ac0f4526dfb80625f5c2365bccd85be68db93ef v5.6-rc1
35e61c77ef386555f3df1bc2057098c6997ca10b v5.6-rc1

backport sent: https://groups.google.com/g/clang-built-linux/c/jHD0eQXFPGk

Was this page helpful?
0 / 5 - 0 ratings