
From: Arnd Bergmann <arnd@arndb.de> maillist inclusion category: bugfix issue: #I3ZXZF CVE: NA Reference: https://lore.kernel.org/patchwork/patch/877882/ ------------------------------------------------- Recent versions of binutils always warn about test-arm.s: arch/arm/probes/kprobes/test-arm.s:18262: Warning: using r15 results in unpredictable behaviour arch/arm/probes/kprobes/test-arm.s:18337: Warning: using r15 results in unpredictable behaviour We could work around this using the __inst_arm() macro for passing the two instruction as a hexadecimal literal number, but as Ard pointed out, there is no reason to leave the warnings enabled for this file in general, we intentionally test for an instruction that is not recommended to be used. For consistency, this turns off the warning in both the ARM and Thumb2 versions of this file. Suggested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Masami Hiramatsu <mhiramat@kernel.org> Signed-off-by: Arnd Bergmann <arnd@arndb.de> [KF: from https://lore.kernel.org/patchwork/patch/877882/] Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com> Reviewed-by: zhangyi (F) <yi.zhang@huawei.com> Signed-off-by: zhangyi (F) <yi.zhang@huawei.com> Signed-off-by: Jing Xiangfeng <jingxiangfeng@huawei.com> Reviewed-by: Chen Wandun <chenwandun@huawei.com> Signed-off-by: Chen Jun <chenjun102@huawei.com> Signed-off-by: Yu Changchun <yuchangchun1@huawei.com> --- arch/arm/probes/kprobes/Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm/probes/kprobes/Makefile b/arch/arm/probes/kprobes/Makefile index 14db56f49f0a..6432578fc74b 100644 --- a/arch/arm/probes/kprobes/Makefile +++ b/arch/arm/probes/kprobes/Makefile @@ -11,3 +11,7 @@ obj-$(CONFIG_KPROBES) += actions-arm.o checkers-arm.o obj-$(CONFIG_OPTPROBES) += opt-arm.o test-kprobes-objs += test-arm.o endif + +# don't warn about intentionally bogus instructions +CFLAGS_test-arm.o += -Wa,--no-warn +CFLAGS_test-thumb.o += -Wa,--no-warn -- 2.22.0