1
0
Fork 0
mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2025-01-23 16:53:58 -05:00
No description
Find a file
Namhyung Kim 4a86d41404 perf tools: Allow build-id with trailing zeros
Currently perf saves a build-id with size but old versions assumes the
size of 20.  In case the build-id is less than 20 (like for MD5), it'd
fill the rest with 0s.

I saw a problem when old version of perf record saved a binary in the
build-id cache and new version of perf reads the data.  The symbols
should be read from the build-id cache (as the path no longer has the
same binary) but it failed due to mismatch in the build-id.

  symsrc__init: build id mismatch for /home/namhyung/.debug/.build-id/53/e4c2f42a4c61a2d632d92a72afa08f00000000/elf.

The build-id event in the data has 20 byte build-ids, but it saw a
different size (16) when it reads the build-id of the elf file in the
build-id cache.

  $ readelf -n ~/.debug/.build-id/53/e4c2f42a4c61a2d632d92a72afa08f00000000/elf

  Displaying notes found in: .note.gnu.build-id
    Owner                Data size 	Description
    GNU                  0x00000010	NT_GNU_BUILD_ID (unique build ID bitstring)
      Build ID: 53e4c2f42a4c61a2d632d92a72afa08f

Let's fix this by allowing trailing zeros if the size is different.

Fixes: 39be8d0115 ("perf tools: Pass build_id object to dso__build_id_equal()")
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Acked-by: Jiri Olsa <jolsa@redhat.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lore.kernel.org/lkml/20210910224630.1084877-1-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-09-11 16:04:47 -03:00
arch This pull request contains the following changes for UML: 2021-09-09 13:45:26 -07:00
block block-5.15-2021-09-05 2021-09-06 10:06:26 -07:00
certs
crypto
Documentation sound fixes for 5.15-rc1 2021-09-09 16:05:10 -07:00
drivers 2nd batch of s390 updates for 5.15 merge window 2021-09-09 12:55:12 -07:00
fs 19 ksmbd fixes, including various fixes pointed out by coverity, id mapping fixes, and some SMB direct fixes 2021-09-09 16:17:14 -07:00
include This pull request contains the following changes for UML: 2021-09-09 13:45:26 -07:00
init More tracing updates for 5.15: 2021-09-09 13:11:15 -07:00
ipc ARM development updates for 5.15: 2021-09-09 13:25:49 -07:00
kernel More tracing updates for 5.15: 2021-09-09 13:11:15 -07:00
lib This pull request contains the following changes for UML: 2021-09-09 13:45:26 -07:00
LICENSES
mm ARM development updates for 5.15: 2021-09-09 13:25:49 -07:00
net Critical bug fixes: 2021-09-08 15:55:42 -07:00
samples kgdb patches for 5.15 2021-09-07 12:08:04 -07:00
scripts Modules updates for v5.15 2021-09-08 16:06:48 -07:00
security
sound sound fixes for 5.15-rc1 2021-09-09 16:05:10 -07:00
tools perf tools: Allow build-id with trailing zeros 2021-09-11 16:04:47 -03:00
usr
virt KVM: Drop unused kvm_dirty_gfn_invalid() 2021-09-06 08:23:46 -04:00
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS ARM development updates for 5.15: 2021-09-09 13:25:49 -07:00
Makefile Makefile: use -Wno-main in the full kernel tree 2021-09-08 09:44:42 -07:00
README

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.