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
changed binding to STB_GLOBAL #1190
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/20201019084140.4532-3-linus.walleij@linaro.org/ |
I don't know how to reference a commit in linux-next but not in mainline... |
Same way:
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 |
Commit d6d51a9 ("ARM: 9014/2: Replace string mem* functions for KASan") add .weak directives to memcpy/memmove/memset to avoid collision with KASAN interceptors. This does not work with LLVM's integrated assembler (the assembly snippet `.weak memcpy ... .globl memcpy` produces a STB_GLOBAL memcpy while GNU as produces a STB_WEAK memcpy). LLVM 12 (since https://reviews.llvm.org/D90108) will error on such an overridden symbol binding. Use the appropriate WEAK macro instead. Link: ClangBuiltLinux/linux#1190 -- Fixes: d6d51a9 ("ARM: 9014/2: Replace string mem* functions for KASan") Reported-by: Nick Desaulniers <ndesaulniers@google.com> Signed-off-by: Fangrui Song <maskray@google.com> Reviewed-by: Nick Desaulniers <ndesaulniers@google.com> Tested-by: Nick Desaulniers <ndesaulniers@google.com> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Commit 39d114d added .weak directives to support KASAN on AArch64, however this breaks support for LLVM's integrated assembler as LLVM switched the .weak directive to produce a STB_GLOBAL binding rather than STB_WEAK [1]. By utilising the WEAK macro instead, both LLVM and GCC will produce a STB_WEAK binding. [1] : https://reviews.llvm.org/D90108 Link: ClangBuiltLinux/linux#1190 Signed-off-by: Diab Neiroukh <lazerl0rd@thezest.dev>
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. |
mainline inclusion from mainline-5.11-rc1 commit 735e8d9 category: feature feature: ARM KASAN support bugzilla: 46872 CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=735e8d93dc2b107f7891a9c2b1c4cfbea1fcbbbc ------------------------------------------------- Commit d6d51a9 ("ARM: 9014/2: Replace string mem* functions for KASan") add .weak directives to memcpy/memmove/memset to avoid collision with KASAN interceptors. This does not work with LLVM's integrated assembler (the assembly snippet `.weak memcpy ... .globl memcpy` produces a STB_GLOBAL memcpy while GNU as produces a STB_WEAK memcpy). LLVM 12 (since https://reviews.llvm.org/D90108) will error on such an overridden symbol binding. Use the appropriate WEAK macro instead. Link: ClangBuiltLinux/linux#1190 Reviewed-by: Jing Xiangfeng <jingxiangfeng@huawei.com> Signed-off-by: Zheng Zengkai <zhengzengkai@huawei.com>
mainline inclusion from mainline-5.11-rc1 commit 735e8d93dc2b107f7891a9c2b1c4cfbea1fcbbbc category: feature feature: ARM KASAN support issue: #I3ZXZF CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=735e8d93dc2b107f7891a9c2b1c4cfbea1fcbbbc ------------------------------------------------- Commit d6d51a96c7d6 ("ARM: 9014/2: Replace string mem* functions for KASan") add .weak directives to memcpy/memmove/memset to avoid collision with KASAN interceptors. This does not work with LLVM's integrated assembler (the assembly snippet `.weak memcpy ... .globl memcpy` produces a STB_GLOBAL memcpy while GNU as produces a STB_WEAK memcpy). LLVM 12 (since https://reviews.llvm.org/D90108) will error on such an overridden symbol binding. Use the appropriate WEAK macro instead. Link: ClangBuiltLinux/linux#1190 Reviewed-by: Jing Xiangfeng <jingxiangfeng@huawei.com> Signed-off-by: Chen Jun <chenjun102@huawei.com> Signed-off-by: Yu Changchun <yuchangchun1@huawei.com>
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: ec9d780
perf patch submitted: https://lore.kernel.org/lkml/20201104005609.1316230-1-maskray@google.com/
I think 32b arm is still a problem:
The text was updated successfully, but these errors were encountered: