Patch "riscv: vdso: Prevent the compiler from inserting calls to memset()" has been added to the 5.15-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    riscv: vdso: Prevent the compiler from inserting calls to memset()

to the 5.15-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     riscv-vdso-prevent-the-compiler-from-inserting-calls.patch
and it can be found in the queue-5.15 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 5c32140f24b70bc6811d7f5322075dd791a169c0
Author: Alexandre Ghiti <alexghiti@xxxxxxxxxxxx>
Date:   Wed Oct 16 10:36:24 2024 +0200

    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@xxxxxxxxxxxxxxx
    Signed-off-by: Alexandre Ghiti <alexghiti@xxxxxxxxxxxx>
    Reviewed-by: Guo Ren <guoren@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20241016083625.136311-2-alexghiti@xxxxxxxxxxxx
    Signed-off-by: Palmer Dabbelt <palmer@xxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/arch/riscv/kernel/vdso/Makefile b/arch/riscv/kernel/vdso/Makefile
index 06e6b27f3bcc9..c1b68f962bada 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)




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux