]> git.itanic.dy.fi Git - linux-stable/commit
perf symbols: Fix unaligned access in get_x86_64_plt_disp()
authorAdrian Hunter <adrian.hunter@intel.com>
Thu, 16 Mar 2023 19:41:55 +0000 (21:41 +0200)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 4 Apr 2023 12:39:56 +0000 (09:39 -0300)
commita2410b579c72242ac0f77b3768093d8c1b48012e
treef418f7606d5110f78cfdef468ee5860a041698cf
parentc8bb2d76a40ac0ccf6303d369e536fddcde847fb
perf symbols: Fix unaligned access in get_x86_64_plt_disp()

Use memcpy() to avoid unaligned access.

Discovered using EXTRA_CFLAGS="-fsanitize=undefined -fsanitize=address".

Fixes: ce4c8e7966f317ef ("perf symbols: Get symbols for .plt.got for x86-64")
Reported-by: kernel test robot <yujie.liu@intel.com>
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Acked-by: Ian Rogers <irogers@google.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: https://lore.kernel.org/oe-lkp/202303061424.6ad43294-yujie.liu@intel.com
Link: https://lore.kernel.org/r/20230316194156.8320-2-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/symbol-elf.c