Patch "perf unwind-libunwind: Fix base address for .eh_frame" has been added to the 6.1-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

    perf unwind-libunwind: Fix base address for .eh_frame

to the 6.1-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:
     perf-unwind-libunwind-fix-base-address-for-.eh_frame.patch
and it can be found in the queue-6.1 subdirectory.

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



commit 942502a8614c0f6d2f4e2a0d1fdb9d7e24970811
Author: Namhyung Kim <namhyung@xxxxxxxxxx>
Date:   Wed May 8 14:00:55 2024 -0700

    perf unwind-libunwind: Fix base address for .eh_frame
    
    [ Upstream commit 4fb54994b2360ab5029ee3a959161f6fe6bbb349 ]
    
    The base address of a DSO mapping should start at the start of the file.
    Usually DSOs are mapped from the pgoff 0 so it doesn't matter when it
    uses the start of the map address.
    
    But generated DSOs for JIT codes doesn't start from the 0 so it should
    subtract the offset to calculate the .eh_frame table offsets correctly.
    
    Fixes: dc2cf4ca866f5715 ("perf unwind: Fix segbase for ld.lld linked objects")
    Reviewed-by: Ian Rogers <irogers@xxxxxxxxxx>
    Signed-off-by: Namhyung Kim <namhyung@xxxxxxxxxx>
    Cc: Adrian Hunter <adrian.hunter@xxxxxxxxx>
    Cc: Fangrui Song <maskray@xxxxxxxxxx>
    Cc: Ingo Molnar <mingo@xxxxxxxxxx>
    Cc: Jiri Olsa <jolsa@xxxxxxxxxx>
    Cc: Milian Wolff <milian.wolff@xxxxxxxx>
    Cc: Pablo Galindo <pablogsal@xxxxxxxxx>
    Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20231212070547.612536-4-namhyung@xxxxxxxxxx
    Signed-off-by: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/tools/perf/util/unwind-libunwind-local.c b/tools/perf/util/unwind-libunwind-local.c
index 81b6bd6e1536a..b276e36e3fb41 100644
--- a/tools/perf/util/unwind-libunwind-local.c
+++ b/tools/perf/util/unwind-libunwind-local.c
@@ -327,7 +327,7 @@ static int read_unwind_spec_eh_frame(struct dso *dso, struct unwind_info *ui,
 
 	maps__for_each_entry(ui->thread->maps, map) {
 		if (map->dso == dso && map->start < base_addr)
-			base_addr = map->start;
+			base_addr = map->start - map->pgoff;
 	}
 	base_addr -= dso->data.elf_base_addr;
 	/* Address of .eh_frame_hdr */




[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