Revision 3cf6a32f3f2a45944dd5be5c6ac4deb46bcd3bee authored by Michael Petlan on 17 March 2022, 13:55:36 UTC, committed by Arnaldo Carvalho de Melo on 18 March 2022, 21:39:09 UTC
Before this patch, the symbol end address fixup to be called, needed two conditions being met: if (prev->end == prev->start && prev->end != curr->start) Where "prev->end == prev->start" means that prev is zero-long (and thus needs a fixup) and "prev->end != curr->start" means that fixup hasn't been applied yet However, this logic is incorrect in the following situation: *curr = {rb_node = {__rb_parent_color = 278218928, rb_right = 0x0, rb_left = 0x0}, start = 0xc000000000062354, end = 0xc000000000062354, namelen = 40, type = 2 '\002', binding = 0 '\000', idle = 0 '\000', ignore = 0 '\000', inlined = 0 '\000', arch_sym = 0 '\000', annotate2 = false, name = 0x1159739e "kprobe_optinsn_page\t[__builtin__kprobes]"} *prev = {rb_node = {__rb_parent_color = 278219041, rb_right = 0x109548b0, rb_left = 0x109547c0}, start = 0xc000000000062354, end = 0xc000000000062354, namelen = 12, type = 2 '\002', binding = 1 '\001', idle = 0 '\000', ignore = 0 '\000', inlined = 0 '\000', arch_sym = 0 '\000', annotate2 = false, name = 0x1095486e "optinsn_slot"} In this case, prev->start == prev->end == curr->start == curr->end, thus the condition above thinks that "we need a fixup due to zero length of prev symbol, but it has been probably done, since the prev->end == curr->start", which is wrong. After the patch, the execution path proceeds to arch__symbols__fixup_end function which fixes up the size of prev symbol by adding page_size to its end offset. Fixes: 3b01a413c196c910 ("perf symbols: Improve kallsyms symbol end addr calculation") Signed-off-by: Michael Petlan <mpetlan@redhat.com> Cc: Athira Jajeev <atrajeev@linux.vnet.ibm.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kajol Jain <kjain@linux.ibm.com> Cc: Madhavan Srinivasan <maddy@linux.ibm.com> Link: http://lore.kernel.org/lkml/20220317135536.805-1-mpetlan@redhat.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
1 parent 34e047a
File | Mode | Size |
---|---|---|
Kconfig | -rw-r--r-- | 2.8 KB |
Makefile | -rw-r--r-- | 703 bytes |
associola.c | -rw-r--r-- | 49.0 KB |
auth.c | -rw-r--r-- | 26.6 KB |
bind_addr.c | -rw-r--r-- | 13.9 KB |
chunk.c | -rw-r--r-- | 9.5 KB |
debug.c | -rw-r--r-- | 3.8 KB |
diag.c | -rw-r--r-- | 13.6 KB |
endpointola.c | -rw-r--r-- | 10.3 KB |
input.c | -rw-r--r-- | 35.7 KB |
inqueue.c | -rw-r--r-- | 6.4 KB |
ipv6.c | -rw-r--r-- | 31.7 KB |
objcnt.c | -rw-r--r-- | 2.8 KB |
offload.c | -rw-r--r-- | 2.6 KB |
output.c | -rw-r--r-- | 23.9 KB |
outqueue.c | -rw-r--r-- | 55.5 KB |
primitive.c | -rw-r--r-- | 6.7 KB |
proc.c | -rw-r--r-- | 10.9 KB |
protocol.c | -rw-r--r-- | 45.7 KB |
sm_make_chunk.c | -rw-r--r-- | 116.9 KB |
sm_sideeffect.c | -rw-r--r-- | 50.8 KB |
sm_statefuns.c | -rw-r--r-- | 208.6 KB |
sm_statetable.c | -rw-r--r-- | 34.3 KB |
socket.c | -rw-r--r-- | 265.1 KB |
stream.c | -rw-r--r-- | 26.5 KB |
stream_interleave.c | -rw-r--r-- | 31.5 KB |
stream_sched.c | -rw-r--r-- | 6.1 KB |
stream_sched_prio.c | -rw-r--r-- | 8.4 KB |
stream_sched_rr.c | -rw-r--r-- | 4.5 KB |
sysctl.c | -rw-r--r-- | 14.9 KB |
transport.c | -rw-r--r-- | 25.7 KB |
tsnmap.c | -rw-r--r-- | 8.8 KB |
ulpevent.c | -rw-r--r-- | 32.5 KB |
ulpqueue.c | -rw-r--r-- | 28.7 KB |
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...