Patch "parisc: Fix backtrace to always include init funtion names" 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

    parisc: Fix backtrace to always include init funtion names

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:
     parisc-fix-backtrace-to-always-include-init-funtion-names.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.


>From 279917e27edc293eb645a25428c6ab3f3bca3f86 Mon Sep 17 00:00:00 2001
From: Helge Deller <deller@xxxxxx>
Date: Thu, 4 Nov 2021 20:19:00 +0100
Subject: parisc: Fix backtrace to always include init funtion names

From: Helge Deller <deller@xxxxxx>

commit 279917e27edc293eb645a25428c6ab3f3bca3f86 upstream.

I noticed that sometimes at kernel startup the backtraces did not
included the function names of init functions. Their address were not
resolved to function names and instead only the address was printed.

Debugging shows that the culprit is is_ksym_addr() which is called
by the backtrace functions to check if an address belongs to a function in
the kernel. The problem occurs only for CONFIG_KALLSYMS_ALL=y.

When looking at is_ksym_addr() one can see that for CONFIG_KALLSYMS_ALL=y
the function only tries to resolve the address via is_kernel() function,
which checks like this:
	if (addr >= _stext && addr <= _end)
                return 1;
On parisc the init functions are located before _stext, so this check fails.
Other platforms seem to have all functions (including init functions)
behind _stext.

The following patch moves the _stext symbol at the beginning of the
kernel and thus includes the init section. This fixes the check and does
not seem to have any negative side effects on where the kernel mapping
happens in the map_pages() function in arch/parisc/mm/init.c.

Signed-off-by: Helge Deller <deller@xxxxxx>
Cc: stable@xxxxxxxxxx # 5.4+
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 arch/parisc/kernel/vmlinux.lds.S |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/arch/parisc/kernel/vmlinux.lds.S
+++ b/arch/parisc/kernel/vmlinux.lds.S
@@ -57,6 +57,8 @@ SECTIONS
 {
 	. = KERNEL_BINARY_TEXT_START;
 
+	_stext = .;	/* start of kernel text, includes init code & data */
+
 	__init_begin = .;
 	HEAD_TEXT_SECTION
 	MLONGCALL_DISCARD(INIT_TEXT_SECTION(8))
@@ -80,7 +82,6 @@ SECTIONS
 	/* freed after init ends here */
 
 	_text = .;		/* Text and read-only data */
-	_stext = .;
 	MLONGCALL_KEEP(INIT_TEXT_SECTION(8))
 	.text ALIGN(PAGE_SIZE) : {
 		TEXT_TEXT


Patches currently in stable-queue which might be from deller@xxxxxx are

queue-5.15/parisc-fix-ptrace-check-on-syscall-return.patch
queue-5.15/task_stack-fix-end_of_stack-for-architectures-with-u.patch
queue-5.15/parisc-kgdb-add-kgdb_roundup-to-make-kgdb-work-with-.patch
queue-5.15/parisc-fix-set_fixmap-on-pa1.x-cpus.patch
queue-5.15/parisc-fix-warning-in-flush_tlb_all.patch
queue-5.15/ftrace-do-cpu-checking-after-preemption-disabled.patch
queue-5.15/parisc-fix-backtrace-to-always-include-init-funtion-names.patch
queue-5.15/parisc-unwind-fix-unwinder-when-config_64bit-is-enab.patch
queue-5.15/parisc-flush-kernel-data-mapping-in-set_pte_at-when-installing-pte-for-user-page.patch



[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