diff options
| author | Alexandre Ghiti <alexghiti@rivosinc.com> | 2024-10-16 10:36:24 +0200 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-11-08 16:28:25 +0100 |
| commit | c19a0c171d37f86ab7267c638d475321fd9f0b77 (patch) | |
| tree | db42f9cdc6d82cd174a8115d5a6c23720efffcac /arch/riscv | |
| parent | e79c1f1c9100b4adc91c6512985db2cc961aafaa (diff) | |
| download | linux-c19a0c171d37f86ab7267c638d475321fd9f0b77.tar.gz linux-c19a0c171d37f86ab7267c638d475321fd9f0b77.tar.bz2 linux-c19a0c171d37f86ab7267c638d475321fd9f0b77.zip | |
riscv: vdso: Prevent the compiler from inserting calls to memset()
[ Upstream commit bf40167d54d55d4b54d0103713d86a8638fb9290 ]
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: e2c0cdfba7f6 ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'arch/riscv')
| -rw-r--r-- | arch/riscv/kernel/vdso/Makefile | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/riscv/kernel/vdso/Makefile b/arch/riscv/kernel/vdso/Makefile index e8aa7c380007..d58f32a2035b 100644 --- a/arch/riscv/kernel/vdso/Makefile +++ b/arch/riscv/kernel/vdso/Makefile @@ -18,6 +18,7 @@ obj-vdso = $(patsubst %, %.o, $(vdso-syms)) note.o ccflags-y := -fno-stack-protector ccflags-y += -DDISABLE_BRANCH_PROFILING +ccflags-y += -fno-builtin ifneq ($(c-gettimeofday-y),) CFLAGS_vgettimeofday.o += -fPIC -include $(c-gettimeofday-y) |
