Patch "hexagon: handle {,SOFT}IRQENTRY_TEXT in linker script" 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

    hexagon: handle {,SOFT}IRQENTRY_TEXT in linker script

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:
     hexagon-handle-soft-irqentry_text-in-linker-script.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 e244413eaade2d32ad69a10ad2167311163ed475
Author: Nathan Chancellor <nathan@xxxxxxxxxx>
Date:   Wed Jul 7 18:07:38 2021 -0700

    hexagon: handle {,SOFT}IRQENTRY_TEXT in linker script
    
    [ Upstream commit 6fef087d0d37ba7dba8f3d75566eb4c256cd6742 ]
    
    Patch series "hexagon: Fix build error with CONFIG_STACKDEPOT and select CONFIG_ARCH_WANT_LD_ORPHAN_WARN".
    
    This series fixes an error with ARCH=hexagon that was pointed out by the
    patch "mm/slub: use stackdepot to save stack trace in objects".
    
    The first patch fixes that error by handling the '.irqentry.text' and
    '.softirqentry.text' sections.
    
    The second patch switches Hexagon over to the common DISCARDS macro, which
    should have been done when Hexagon was merged into the tree to match
    commit 023bf6f1b8bf ("linker script: unify usage of discard definition").
    
    The third patch selects CONFIG_ARCH_WANT_LD_ORPHAN_WARN so that something
    like this does not happen again.
    
    This patch (of 3):
    
    Patch "mm/slub: use stackdepot to save stack trace in objects" in -mm
    selects CONFIG_STACKDEPOT when CONFIG_STACKTRACE_SUPPORT is selected and
    CONFIG_STACKDEPOT requires IRQENTRY_TEXT and SOFTIRQENTRY_TEXT to be
    handled after commit 505a0ef15f96 ("kasan: stackdepot: move
    filter_irq_stacks() to stackdepot.c") due to the use of the
    __{,soft}irqentry_text_{start,end} section symbols.  If those sections are
    not handled, the build is broken.
    
    $ make ARCH=hexagon CROSS_COMPILE=hexagon-linux- LLVM=1 LLVM_IAS=1 defconfig all
    ...
    ld.lld: error: undefined symbol: __irqentry_text_start
    >>> referenced by stackdepot.c
    >>>               stackdepot.o:(filter_irq_stacks) in archive lib/built-in.a
    >>> referenced by stackdepot.c
    >>>               stackdepot.o:(filter_irq_stacks) in archive lib/built-in.a
    
    ld.lld: error: undefined symbol: __irqentry_text_end
    >>> referenced by stackdepot.c
    >>>               stackdepot.o:(filter_irq_stacks) in archive lib/built-in.a
    >>> referenced by stackdepot.c
    >>>               stackdepot.o:(filter_irq_stacks) in archive lib/built-in.a
    
    ld.lld: error: undefined symbol: __softirqentry_text_start
    >>> referenced by stackdepot.c
    >>>               stackdepot.o:(filter_irq_stacks) in archive lib/built-in.a
    >>> referenced by stackdepot.c
    >>>               stackdepot.o:(filter_irq_stacks) in archive lib/built-in.a
    
    ld.lld: error: undefined symbol: __softirqentry_text_end
    >>> referenced by stackdepot.c
    >>>               stackdepot.o:(filter_irq_stacks) in archive lib/built-in.a
    >>> referenced by stackdepot.c
    >>>               stackdepot.o:(filter_irq_stacks) in archive lib/built-in.a
    ...
    
    Add these sections to the Hexagon linker script so the build continues to
    work.  ld.lld's orphan section warning would have caught this prior to the
    -mm commit mentioned above:
    
    ld.lld: warning: kernel/built-in.a(softirq.o):(.softirqentry.text) is being placed in '.softirqentry.text'
    ld.lld: warning: kernel/built-in.a(softirq.o):(.softirqentry.text) is being placed in '.softirqentry.text'
    ld.lld: warning: kernel/built-in.a(softirq.o):(.softirqentry.text) is being placed in '.softirqentry.text'
    
    Link: https://lkml.kernel.org/r/20210521011239.1332345-1-nathan@xxxxxxxxxx
    Link: https://lkml.kernel.org/r/20210521011239.1332345-2-nathan@xxxxxxxxxx
    Link: https://github.com/ClangBuiltLinux/linux/issues/1381
    Fixes: 505a0ef15f96 ("kasan: stackdepot: move filter_irq_stacks() to stackdepot.c")
    Signed-off-by: Nathan Chancellor <nathan@xxxxxxxxxx>
    Reviewed-by: Nick Desaulniers <ndesaulniers@xxxxxxxxxx>
    Acked-by: Brian Cain <bcain@xxxxxxxxxxxxxx>
    Cc: Oliver Glitta <glittao@xxxxxxxxx>
    Cc: Vlastimil Babka <vbabka@xxxxxxx>
    Cc: David Rientjes <rientjes@xxxxxxxxxx>
    Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
    Signed-off-by: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/arch/hexagon/kernel/vmlinux.lds.S b/arch/hexagon/kernel/vmlinux.lds.S
index 35b18e55eae8..20f19539c5fc 100644
--- a/arch/hexagon/kernel/vmlinux.lds.S
+++ b/arch/hexagon/kernel/vmlinux.lds.S
@@ -38,6 +38,8 @@ SECTIONS
 	.text : AT(ADDR(.text)) {
 		_text = .;
 		TEXT_TEXT
+		IRQENTRY_TEXT
+		SOFTIRQENTRY_TEXT
 		SCHED_TEXT
 		CPUIDLE_TEXT
 		LOCK_TEXT



[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