lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Thu, 9 Nov 2017 06:53:54 +0100 From: Luc Van Oostenryck <luc.vanoostenryck@...il.com> To: Palmer Dabbelt <palmer@...ive.com> Cc: Luc Van Oostenryck <luc.vanoostenryck@...il.com>, Albert Ou <albert@...ive.com>, patches@...ups.riscv.org, linux-kernel@...r.kernel.org Subject: [PATCH 2/2] riscv: pass machine size to sparse By default, sparse assumes a 64bit machine when compiled on x86-64 and 32bit when compiled on anything else. This can of course create all sort of problems when this doesn't correspond to the target's machine size, like issuing false warnings like: 'constant ... is so big it is unsigned long long' or 'shift too big (32) for type unsigned long' when the architecture is 64bit while sparse was compiled on a 32bit machine, or worse, to not emit legitimate warnings in the reverse situation. Fix this by passing the appropriate -m32/-m64 flag to sparse. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@...il.com> --- arch/riscv/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/riscv/Makefile b/arch/riscv/Makefile index 206484dde..a0ea7a71d 100644 --- a/arch/riscv/Makefile +++ b/arch/riscv/Makefile @@ -27,6 +27,7 @@ ifeq ($(CONFIG_ARCH_RV64I),y) KBUILD_AFLAGS += -mabi=lp64 KBUILD_MARCH = rv64im LDFLAGS += -melf64lriscv + CHECKFLAGS += -m64 else BITS := 32 UTS_MACHINE := riscv32 @@ -35,6 +36,7 @@ else KBUILD_AFLAGS += -mabi=ilp32 KBUILD_MARCH = rv32im LDFLAGS += -melf32lriscv + CHECKFLAGS += -m32 endif KBUILD_CFLAGS += -Wall -- 2.14.0
Powered by blists - more mailing lists