From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
stable@vger.kernel.org, Daniel Dao <dqminh@cloudflare.com>,
Adrian Hunter <adrian.hunter@intel.com>,
Namhyung Kim <namhyung@kernel.org>,
Ian Rogers <irogers@google.com>, Jiri Olsa <jolsa@kernel.org>,
Arnaldo Carvalho de Melo <acme@redhat.com>,
Sasha Levin <sashal@kernel.org>
Subject: [PATCH 4.19 48/58] perf kcore_copy: Do not check /proc/modules is unchanged
Date: Mon, 26 Sep 2022 12:12:07 +0200 [thread overview]
Message-ID: <20220926100743.209738261@linuxfoundation.org> (raw)
In-Reply-To: <20220926100741.430882406@linuxfoundation.org>
From: Adrian Hunter <adrian.hunter@intel.com>
[ Upstream commit 5b427df27b94aec1312cace48a746782a0925c53 ]
/proc/kallsyms and /proc/modules are compared before and after the copy
in order to ensure no changes during the copy.
However /proc/modules also might change due to reference counts changing
even though that does not make any difference.
Any modules loaded or unloaded should be visible in changes to kallsyms,
so it is not necessary to check /proc/modules also anyway.
Remove the comparison checking that /proc/modules is unchanged.
Fixes: fc1b691d7651d949 ("perf buildid-cache: Add ability to add kcore to the cache")
Reported-by: Daniel Dao <dqminh@cloudflare.com>
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Tested-by: Daniel Dao <dqminh@cloudflare.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Ian Rogers <irogers@google.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Link: https://lore.kernel.org/r/20220914122429.8770-1-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
tools/perf/util/symbol-elf.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/tools/perf/util/symbol-elf.c b/tools/perf/util/symbol-elf.c
index bd33d6613929..5fba57c10edd 100644
--- a/tools/perf/util/symbol-elf.c
+++ b/tools/perf/util/symbol-elf.c
@@ -1871,8 +1871,8 @@ static int kcore_copy__compare_file(const char *from_dir, const char *to_dir,
* unusual. One significant peculiarity is that the mapping (start -> pgoff)
* is not the same for the kernel map and the modules map. That happens because
* the data is copied adjacently whereas the original kcore has gaps. Finally,
- * kallsyms and modules files are compared with their copies to check that
- * modules have not been loaded or unloaded while the copies were taking place.
+ * kallsyms file is compared with its copy to check that modules have not been
+ * loaded or unloaded while the copies were taking place.
*
* Return: %0 on success, %-1 on failure.
*/
@@ -1935,9 +1935,6 @@ int kcore_copy(const char *from_dir, const char *to_dir)
goto out_extract_close;
}
- if (kcore_copy__compare_file(from_dir, to_dir, "modules"))
- goto out_extract_close;
-
if (kcore_copy__compare_file(from_dir, to_dir, "kallsyms"))
goto out_extract_close;
--
2.35.1
next prev parent reply other threads:[~2022-09-26 10:36 UTC|newest]
Thread overview: 63+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-26 10:11 [PATCH 4.19 00/58] 4.19.260-rc1 review Greg Kroah-Hartman
2022-09-26 10:11 ` [PATCH 4.19 01/58] of: fdt: fix off-by-one error in unflatten_dt_nodes() Greg Kroah-Hartman
2022-09-26 10:11 ` [PATCH 4.19 02/58] gpio: mpc8xxx: Fix support for IRQ_TYPE_LEVEL_LOW flow_type in mpc85xx Greg Kroah-Hartman
2022-09-26 10:11 ` [PATCH 4.19 03/58] drm/meson: Correct OSD1 global alpha value Greg Kroah-Hartman
2022-09-26 10:11 ` [PATCH 4.19 04/58] parisc: ccio-dma: Add missing iounmap in error path in ccio_probe() Greg Kroah-Hartman
2022-09-26 10:11 ` [PATCH 4.19 05/58] efi/libstub: Disable Shadow Call Stack Greg Kroah-Hartman
2022-09-26 10:11 ` [PATCH 4.19 06/58] efi: libstub: Disable struct randomization Greg Kroah-Hartman
2022-09-26 10:11 ` [PATCH 4.19 07/58] nvmet: fix a use-after-free Greg Kroah-Hartman
2022-09-26 10:11 ` [PATCH 4.19 08/58] mvpp2: no need to check return value of debugfs_create functions Greg Kroah-Hartman
2022-09-26 10:11 ` [PATCH 4.19 09/58] cifs: dont send down the destination address to sendmsg for a SOCK_STREAM Greg Kroah-Hartman
2022-09-26 10:11 ` [PATCH 4.19 10/58] ASoC: nau8824: Fix semaphore unbalance at error paths Greg Kroah-Hartman
2022-09-26 10:11 ` [PATCH 4.19 11/58] regulator: pfuze100: Fix the global-out-of-bounds access in pfuze100_regulator_probe() Greg Kroah-Hartman
2022-09-26 10:11 ` [PATCH 4.19 12/58] rxrpc: Fix local destruction being repeated Greg Kroah-Hartman
2022-09-26 10:11 ` [PATCH 4.19 13/58] ALSA: hda/sigmatel: Keep power up while beep is enabled Greg Kroah-Hartman
2022-09-26 10:11 ` [PATCH 4.19 14/58] net: usb: qmi_wwan: add Quectel RM520N Greg Kroah-Hartman
2022-09-26 10:11 ` [PATCH 4.19 15/58] MIPS: OCTEON: irq: Fix octeon_irq_force_ciu_mapping() Greg Kroah-Hartman
2022-09-26 10:11 ` [PATCH 4.19 16/58] mksysmap: Fix the mismatch of L0 symbols in System.map Greg Kroah-Hartman
2022-09-26 10:11 ` [PATCH 4.19 17/58] video: fbdev: pxa3xx-gcu: Fix integer overflow in pxa3xx_gcu_write Greg Kroah-Hartman
2022-09-26 10:11 ` [PATCH 4.19 18/58] ALSA: hda/sigmatel: Fix unused variable warning for beep power change Greg Kroah-Hartman
2022-09-26 10:11 ` [PATCH 4.19 19/58] usb: dwc3: pci: Add Support for Intel Elkhart Lake Devices Greg Kroah-Hartman
2022-09-26 10:11 ` [PATCH 4.19 20/58] usb: dwc3: pci: add support for TigerLake Devices Greg Kroah-Hartman
2022-09-26 10:11 ` [PATCH 4.19 21/58] usb: dwc3: pci: add support for the Intel Tiger Lake PCH -H variant Greg Kroah-Hartman
2022-09-26 10:11 ` [PATCH 4.19 22/58] usb: dwc3: pci: add support for the Intel Jasper Lake Greg Kroah-Hartman
2022-09-26 10:11 ` [PATCH 4.19 23/58] usb: dwc3: pci: add support for the Intel Alder Lake-S Greg Kroah-Hartman
2022-09-26 10:11 ` [PATCH 4.19 24/58] wifi: mac80211: Fix UAF in ieee80211_scan_rx() Greg Kroah-Hartman
2022-09-26 10:11 ` [PATCH 4.19 25/58] USB: core: Fix RST error in hub.c Greg Kroah-Hartman
2022-09-26 10:11 ` [PATCH 4.19 26/58] USB: serial: option: add Quectel BG95 0x0203 composition Greg Kroah-Hartman
2022-09-26 10:11 ` [PATCH 4.19 27/58] USB: serial: option: add Quectel RM520N Greg Kroah-Hartman
2022-09-26 10:11 ` [PATCH 4.19 28/58] ALSA: hda/tegra: set depop delay for tegra Greg Kroah-Hartman
2022-09-26 10:11 ` [PATCH 4.19 29/58] ALSA: hda: add Intel 5 Series / 3400 PCI DID Greg Kroah-Hartman
2022-09-26 10:11 ` [PATCH 4.19 30/58] ALSA: hda/realtek: Enable 4-speaker output Dell Precision 5530 laptop Greg Kroah-Hartman
2022-09-26 10:11 ` [PATCH 4.19 31/58] efi: libstub: check Shim mode using MokSBStateRT Greg Kroah-Hartman
2022-09-26 10:11 ` [PATCH 4.19 32/58] riscv: fix a nasty sigreturn bug Greg Kroah-Hartman
2022-09-26 10:11 ` [PATCH 4.19 33/58] mm/slub: fix to return errno if kmalloc() fails Greg Kroah-Hartman
2022-09-26 10:11 ` [PATCH 4.19 34/58] arm64: dts: rockchip: Set RK3399-Gru PCLK_EDP to 24 MHz Greg Kroah-Hartman
2022-09-26 10:11 ` [PATCH 4.19 35/58] arm64: dts: rockchip: Remove enable-active-low from rk3399-puma Greg Kroah-Hartman
2022-09-26 10:11 ` [PATCH 4.19 36/58] netfilter: nf_conntrack_sip: fix ct_sip_walk_headers Greg Kroah-Hartman
2022-09-26 10:11 ` [PATCH 4.19 37/58] netfilter: nf_conntrack_irc: Tighten matching on DCC message Greg Kroah-Hartman
2022-09-26 10:11 ` [PATCH 4.19 38/58] iavf: Fix cached head and tail value for iavf_get_tx_pending Greg Kroah-Hartman
2022-09-26 10:11 ` [PATCH 4.19 39/58] ipvlan: Fix out-of-bound bugs caused by unset skb->mac_header Greg Kroah-Hartman
2022-09-26 10:11 ` [PATCH 4.19 40/58] net: team: Unsync device addresses on ndo_stop Greg Kroah-Hartman
2022-09-26 10:12 ` [PATCH 4.19 41/58] MIPS: lantiq: export clk_get_io() for lantiq_wdt.ko Greg Kroah-Hartman
2022-09-26 10:12 ` [PATCH 4.19 42/58] i40e: Fix VF set max MTU size Greg Kroah-Hartman
2022-09-26 10:12 ` [PATCH 4.19 43/58] i40e: Fix set max_tx_rate when it is lower than 1 Mbps Greg Kroah-Hartman
2022-09-26 10:12 ` [PATCH 4.19 44/58] of: mdio: Add of_node_put() when breaking out of for_each_xx Greg Kroah-Hartman
2022-09-26 10:12 ` [PATCH 4.19 45/58] netfilter: ebtables: fix memory leak when blob is malformed Greg Kroah-Hartman
2022-09-26 10:12 ` [PATCH 4.19 46/58] can: gs_usb: gs_can_open(): fix race dev->can.state condition Greg Kroah-Hartman
2022-09-26 10:12 ` [PATCH 4.19 47/58] perf jit: Include program header in ELF files Greg Kroah-Hartman
2022-09-26 10:12 ` Greg Kroah-Hartman [this message]
2022-09-26 10:12 ` [PATCH 4.19 49/58] net: sunhme: Fix packet reception for len < RX_COPY_THRESHOLD Greg Kroah-Hartman
2022-09-26 10:12 ` [PATCH 4.19 50/58] serial: Create uart_xmit_advance() Greg Kroah-Hartman
2022-09-26 10:12 ` [PATCH 4.19 51/58] serial: tegra: Use uart_xmit_advance(), fixes icount.tx accounting Greg Kroah-Hartman
2022-09-26 10:12 ` [PATCH 4.19 52/58] s390/dasd: fix Oops in dasd_alias_get_start_dev due to missing pavgroup Greg Kroah-Hartman
2022-09-26 10:12 ` [PATCH 4.19 53/58] Drivers: hv: Never allocate anything besides framebuffer from framebuffer memory region Greg Kroah-Hartman
2022-09-26 10:12 ` [PATCH 4.19 54/58] drm/amd/display: Limit user regamma to a valid value Greg Kroah-Hartman
2022-09-26 10:12 ` [PATCH 4.19 55/58] drm/rockchip: Fix return type of cdn_dp_connector_mode_valid Greg Kroah-Hartman
2022-09-26 10:12 ` [PATCH 4.19 56/58] workqueue: dont skip lockdep work dependency in cancel_work_sync() Greg Kroah-Hartman
2022-09-26 10:12 ` [PATCH 4.19 57/58] ext4: make directory inode spreading reflect flexbg size Greg Kroah-Hartman
2022-09-26 10:12 ` [PATCH 4.19 58/58] usb: dwc3: pci: Allow Elkhart Lake to utilize DSM method for PM functionality Greg Kroah-Hartman
2022-09-26 13:36 ` [PATCH 4.19 00/58] 4.19.260-rc1 review Pavel Machek
2022-09-26 13:40 ` Guenter Roeck
2022-09-26 16:20 ` Greg Kroah-Hartman
2022-09-27 0:59 ` Shuah Khan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220926100743.209738261@linuxfoundation.org \
--to=gregkh@linuxfoundation.org \
--cc=acme@redhat.com \
--cc=adrian.hunter@intel.com \
--cc=dqminh@cloudflare.com \
--cc=irogers@google.com \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=namhyung@kernel.org \
--cc=sashal@kernel.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox