Skip to content

Commit bf40167

Browse files
Alexandre Ghitipalmer-dabbelt
authored andcommitted
riscv: vdso: Prevent the compiler from inserting calls to memset()
The compiler is smart enough to insert a call to memset() in riscv_vdso_get_cpus(), which generates a dynamic relocation. So prevent this by using -fno-builtin option. Fixes: e2c0cdf ("RISC-V: User-facing API") Cc: stable@vger.kernel.org Signed-off-by: Alexandre Ghiti <alexghiti@rivosinc.com> Reviewed-by: Guo Ren <guoren@kernel.org> Link: https://lore.kernel.org/r/20241016083625.136311-2-alexghiti@rivosinc.com Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
1 parent 9852d85 commit bf40167

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

arch/riscv/kernel/vdso/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ obj-vdso = $(patsubst %, %.o, $(vdso-syms)) note.o
1818

1919
ccflags-y := -fno-stack-protector
2020
ccflags-y += -DDISABLE_BRANCH_PROFILING
21+
ccflags-y += -fno-builtin
2122

2223
ifneq ($(c-gettimeofday-y),)
2324
CFLAGS_vgettimeofday.o += -fPIC -include $(c-gettimeofday-y)

0 commit comments

Comments
 (0)