Revision a09935b878dc8efd4b030ed1ffa0553fc9011fb8 authored by Namhyung Kim on 31 May 2017, 12:01:05 UTC, committed by Arnaldo Carvalho de Melo on 05 June 2017, 17:17:59 UTC
The decompress_kmodule() decompresses kernel modules in order to load
symbols from it.  In the DSO_BINARY_TYPE__BUILD_ID_CACHE case, it needs
the full file path to extract the file extension to determine the
decompression method.  But overwriting 'name' will fail the
decompression since it might point to a non-existing old file.

Instead, use dso->long_name for having the correct extension and use the
real filename to decompress.

In the DSO_BINARY_TYPE__SYSTEM_PATH_KMODULE_COMP case, both names should
be the same.  This allows resolving symbols in the old modules.

Before:

  $ perf report -i perf.data.old | grep scsi_mod
     0.00%  cc1      [scsi_mod]    [k] 0x0000000000004aa6
     0.00%  as       [scsi_mod]    [k] 0x00000000000099e1
     0.00%  cc1      [scsi_mod]    [k] 0x0000000000009830
     0.00%  cc1      [scsi_mod]    [k] 0x0000000000001b8f

After:

     0.00%  cc1      [scsi_mod]    [k] scsi_handle_queue_ramp_up
     0.00%  as       [scsi_mod]    [k] scsi_sg_alloc
     0.00%  cc1      [scsi_mod]    [k] scsi_setup_cmnd
     0.00%  cc1      [scsi_mod]    [k] scsi_get_command

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: kernel-team@lge.com
Link: http://lkml.kernel.org/r/20170531120105.21731-3-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
1 parent 6b335e8
History
File Mode Size
Kconfig -rw-r--r-- 13.7 KB
Makefile -rw-r--r-- 2.1 KB
core.c -rw-r--r-- 24.0 KB
pwm-ab8500.c -rw-r--r-- 3.3 KB
pwm-atmel-hlcdc.c -rw-r--r-- 8.0 KB
pwm-atmel-tcb.c -rw-r--r-- 11.7 KB
pwm-atmel.c -rw-r--r-- 10.4 KB
pwm-bcm-iproc.c -rw-r--r-- 7.5 KB
pwm-bcm-kona.c -rw-r--r-- 9.5 KB
pwm-bcm2835.c -rw-r--r-- 5.0 KB
pwm-berlin.c -rw-r--r-- 7.3 KB
pwm-bfin.c -rw-r--r-- 3.1 KB
pwm-brcmstb.c -rw-r--r-- 8.3 KB
pwm-clps711x.c -rw-r--r-- 4.3 KB
pwm-crc.c -rw-r--r-- 3.6 KB
pwm-cros-ec.c -rw-r--r-- 6.0 KB
pwm-ep93xx.c -rw-r--r-- 5.8 KB
pwm-fsl-ftm.c -rw-r--r-- 12.2 KB
pwm-hibvt.c -rw-r--r-- 7.2 KB
pwm-img.c -rw-r--r-- 8.0 KB
pwm-imx.c -rw-r--r-- 8.2 KB
pwm-jz4740.c -rw-r--r-- 4.8 KB
pwm-lp3943.c -rw-r--r-- 7.5 KB
pwm-lpc18xx-sct.c -rw-r--r-- 13.6 KB
pwm-lpc32xx.c -rw-r--r-- 4.4 KB
pwm-lpss-pci.c -rw-r--r-- 3.2 KB
pwm-lpss-platform.c -rw-r--r-- 2.3 KB
pwm-lpss.c -rw-r--r-- 5.8 KB
pwm-lpss.h -rw-r--r-- 776 bytes
pwm-mediatek.c -rw-r--r-- 4.9 KB
pwm-meson.c -rw-r--r-- 13.4 KB
pwm-mtk-disp.c -rw-r--r-- 7.2 KB
pwm-mxs.c -rw-r--r-- 4.7 KB
pwm-omap-dmtimer.c -rw-r--r-- 10.3 KB
pwm-pca9685.c -rw-r--r-- 14.4 KB
pwm-puv3.c -rw-r--r-- 3.5 KB
pwm-pxa.c -rw-r--r-- 5.5 KB
pwm-rcar.c -rw-r--r-- 6.6 KB
pwm-renesas-tpu.c -rw-r--r-- 11.9 KB
pwm-rockchip.c -rw-r--r-- 10.1 KB
pwm-samsung.c -rw-r--r-- 16.9 KB
pwm-spear.c -rw-r--r-- 6.5 KB
pwm-sti.c -rw-r--r-- 16.6 KB
pwm-stm32.c -rw-r--r-- 8.9 KB
pwm-stmpe.c -rw-r--r-- 7.2 KB
pwm-sun4i.c -rw-r--r-- 9.2 KB
pwm-tegra.c -rw-r--r-- 7.2 KB
pwm-tiecap.c -rw-r--r-- 8.1 KB
pwm-tiehrpwm.c -rw-r--r-- 15.7 KB
pwm-tipwmss.c -rw-r--r-- 1.6 KB
pwm-twl-led.c -rw-r--r-- 8.6 KB
pwm-twl.c -rw-r--r-- 9.3 KB
pwm-vt8500.c -rw-r--r-- 6.8 KB
sysfs.c -rw-r--r-- 9.4 KB

back to top