Patch "MIPS: compressed: fix build with enabled UBSAN" has been added to the 5.10-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

    MIPS: compressed: fix build with enabled UBSAN

to the 5.10-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:
     mips-compressed-fix-build-with-enabled-ubsan.patch
and it can be found in the queue-5.10 subdirectory.

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



commit 542109b14c7db464e75eb0e768afc13456a1738a
Author: Alexander Lobakin <alobakin@xxxxx>
Date:   Mon Feb 8 12:37:42 2021 +0000

    MIPS: compressed: fix build with enabled UBSAN
    
    [ Upstream commit fc4cac4cfc437659ce445c3c47b807e1cc625b66 ]
    
    Commit 1e35918ad9d1 ("MIPS: Enable Undefined Behavior Sanitizer
    UBSAN") added a possibility to build the entire kernel with UBSAN
    instrumentation for MIPS, with the exception for VDSO.
    However, self-extracting head wasn't been added to exceptions, so
    this occurs:
    
    mips-alpine-linux-musl-ld: arch/mips/boot/compressed/decompress.o:
    in function `FSE_buildDTable_wksp':
    decompress.c:(.text.FSE_buildDTable_wksp+0x278): undefined reference
    to `__ubsan_handle_shift_out_of_bounds'
    mips-alpine-linux-musl-ld: decompress.c:(.text.FSE_buildDTable_wksp+0x2a8):
    undefined reference to `__ubsan_handle_shift_out_of_bounds'
    mips-alpine-linux-musl-ld: decompress.c:(.text.FSE_buildDTable_wksp+0x2c4):
    undefined reference to `__ubsan_handle_shift_out_of_bounds'
    mips-alpine-linux-musl-ld: arch/mips/boot/compressed/decompress.o:
    decompress.c:(.text.FSE_buildDTable_raw+0x9c): more undefined references
    to `__ubsan_handle_shift_out_of_bounds' follow
    
    Add UBSAN_SANITIZE := n to mips/boot/compressed/Makefile to exclude
    it from instrumentation scope and fix this issue.
    
    Fixes: 1e35918ad9d1 ("MIPS: Enable Undefined Behavior Sanitizer UBSAN")
    Cc: stable@xxxxxxxxxxxxxxx # 5.0+
    Signed-off-by: Alexander Lobakin <alobakin@xxxxx>
    Signed-off-by: Thomas Bogendoerfer <tsbogend@xxxxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/arch/mips/boot/compressed/Makefile b/arch/mips/boot/compressed/Makefile
index d66511825fe1..337ab1d18cc1 100644
--- a/arch/mips/boot/compressed/Makefile
+++ b/arch/mips/boot/compressed/Makefile
@@ -36,6 +36,7 @@ KBUILD_AFLAGS := $(KBUILD_AFLAGS) -D__ASSEMBLY__ \
 
 # Prevents link failures: __sanitizer_cov_trace_pc() is not linked in.
 KCOV_INSTRUMENT		:= n
+UBSAN_SANITIZE := n
 
 # decompressor objects (linked with vmlinuz)
 vmlinuzobjs-y := $(obj)/head.o $(obj)/decompress.o $(obj)/string.o



[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