]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
riscv: vdso: Prevent the compiler from inserting calls to memset()
authorAlexandre Ghiti <alexghiti@rivosinc.com>
Wed, 16 Oct 2024 08:36:24 +0000 (10:36 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 8 Nov 2024 15:25:54 +0000 (16:25 +0100)
commit1c54b0b0d72c75e8dfb69643d75bc1deda2ff44e
treeca02a5ae8ac8ea02a1754f7e12b9926e360a78b7
parent69548bb663fcb63f9ee0301be808a36b9d78dac3
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>
arch/riscv/kernel/vdso/Makefile