From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
stable@vger.kernel.org, Josh Poimboeuf <jpoimboe@redhat.com>,
Borislav Petkov <bp@suse.de>, Miroslav Benes <mbenes@suse.cz>,
"Peter Zijlstra (Intel)" <peterz@infradead.org>
Subject: [PATCH 5.4 006/118] objtool: Fix switch table detection in .text.unlikely
Date: Wed, 22 Apr 2020 11:56:07 +0200 [thread overview]
Message-ID: <20200422095032.591782334@linuxfoundation.org> (raw)
In-Reply-To: <20200422095031.522502705@linuxfoundation.org>
From: Josh Poimboeuf <jpoimboe@redhat.com>
commit b401efc120a399dfda1f4d2858a4de365c9b08ef upstream.
If a switch jump table's indirect branch is in a ".cold" subfunction in
.text.unlikely, objtool doesn't detect it, and instead prints a false
warning:
drivers/media/v4l2-core/v4l2-ioctl.o: warning: objtool: v4l_print_format.cold()+0xd6: sibling call from callable instruction with modified stack frame
drivers/hwmon/max6650.o: warning: objtool: max6650_probe.cold()+0xa5: sibling call from callable instruction with modified stack frame
drivers/media/dvb-frontends/drxk_hard.o: warning: objtool: init_drxk.cold()+0x16f: sibling call from callable instruction with modified stack frame
Fix it by comparing the function, instead of the section and offset.
Fixes: 13810435b9a7 ("objtool: Support GCC 8's cold subfunctions")
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Miroslav Benes <mbenes@suse.cz>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/157c35d42ca9b6354bbb1604fe9ad7d1153ccb21.1585761021.git.jpoimboe@redhat.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
tools/objtool/check.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
--- a/tools/objtool/check.c
+++ b/tools/objtool/check.c
@@ -1010,10 +1010,7 @@ static struct rela *find_jump_table(stru
* it.
*/
for (;
- &insn->list != &file->insn_list &&
- insn->sec == func->sec &&
- insn->offset >= func->offset;
-
+ &insn->list != &file->insn_list && insn->func && insn->func->pfunc == func;
insn = insn->first_jump_src ?: list_prev_entry(insn, list)) {
if (insn != orig_insn && insn->type == INSN_JUMP_DYNAMIC)
next prev parent reply other threads:[~2020-04-22 10:46 UTC|newest]
Thread overview: 124+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-22 9:56 [PATCH 5.4 000/118] 5.4.35-rc1 review Greg Kroah-Hartman
2020-04-22 9:56 ` [PATCH 5.4 001/118] ext4: use non-movable memory for superblock readahead Greg Kroah-Hartman
2020-04-22 9:56 ` [PATCH 5.4 002/118] watchdog: sp805: fix restart handler Greg Kroah-Hartman
2020-04-22 9:56 ` [PATCH 5.4 003/118] xsk: Fix out of boundary write in __xsk_rcv_memcpy Greg Kroah-Hartman
2020-04-22 9:56 ` [PATCH 5.4 004/118] arm, bpf: Fix bugs with ALU64 {RSH, ARSH} BPF_K shift by 0 Greg Kroah-Hartman
2020-04-22 9:56 ` [PATCH 5.4 005/118] arm, bpf: Fix offset overflow for BPF_MEM BPF_DW Greg Kroah-Hartman
2020-04-22 9:56 ` Greg Kroah-Hartman [this message]
2020-04-22 9:56 ` [PATCH 5.4 007/118] scsi: sg: add sg_remove_request in sg_common_write Greg Kroah-Hartman
2020-04-22 9:56 ` [PATCH 5.4 008/118] ALSA: hda: Honor PM disablement in PM freeze and thaw_noirq ops Greg Kroah-Hartman
2020-04-22 9:56 ` [PATCH 5.4 009/118] ARM: dts: imx6: Use gpc for FEC interrupt controller to fix wake on LAN Greg Kroah-Hartman
2020-04-22 9:56 ` [PATCH 5.4 010/118] kbuild, btf: Fix dependencies for DEBUG_INFO_BTF Greg Kroah-Hartman
2020-04-22 9:56 ` [PATCH 5.4 011/118] netfilter: nf_tables: report EOPNOTSUPP on unsupported flags/object type Greg Kroah-Hartman
2020-04-22 9:56 ` [PATCH 5.4 012/118] irqchip/mbigen: Free msi_desc on device teardown Greg Kroah-Hartman
2020-04-22 9:56 ` [PATCH 5.4 013/118] ALSA: hda: Dont release card at firmware loading error Greg Kroah-Hartman
2020-04-22 9:56 ` [PATCH 5.4 014/118] xsk: Add missing check on user supplied headroom size Greg Kroah-Hartman
2020-04-22 9:56 ` [PATCH 5.4 015/118] of: unittest: kmemleak on changeset destroy Greg Kroah-Hartman
2020-04-22 9:56 ` [PATCH 5.4 016/118] of: unittest: kmemleak in of_unittest_platform_populate() Greg Kroah-Hartman
2020-04-22 9:56 ` [PATCH 5.4 017/118] of: unittest: kmemleak in of_unittest_overlay_high_level() Greg Kroah-Hartman
2020-04-22 9:56 ` [PATCH 5.4 018/118] of: overlay: kmemleak in dup_and_fixup_symbol_prop() Greg Kroah-Hartman
2020-04-22 9:56 ` [PATCH 5.4 019/118] x86/Hyper-V: Unload vmbus channel in hv panic callback Greg Kroah-Hartman
2020-04-22 9:56 ` [PATCH 5.4 020/118] x86/Hyper-V: Trigger crash enlightenment only once during system crash Greg Kroah-Hartman
2020-04-22 9:56 ` [PATCH 5.4 021/118] x86/Hyper-V: Report crash register data or kmsg before running crash kernel Greg Kroah-Hartman
2020-04-22 9:56 ` [PATCH 5.4 022/118] x86/Hyper-V: Report crash register data when sysctl_record_panic_msg is not set Greg Kroah-Hartman
2020-04-22 9:56 ` [PATCH 5.4 023/118] x86/Hyper-V: Report crash data in die() when panic_on_oops is set Greg Kroah-Hartman
2020-04-22 9:56 ` [PATCH 5.4 024/118] afs: Fix missing XDR advance in xdr_decode_{AFS,YFS}FSFetchStatus() Greg Kroah-Hartman
2020-04-22 9:56 ` [PATCH 5.4 025/118] afs: Fix decoding of inline abort codes from version 1 status records Greg Kroah-Hartman
2020-04-22 9:56 ` [PATCH 5.4 026/118] afs: Fix rename operation status delivery Greg Kroah-Hartman
2020-04-22 9:56 ` [PATCH 5.4 027/118] afs: Fix afs_d_validate() to set the right directory version Greg Kroah-Hartman
2020-04-22 9:56 ` [PATCH 5.4 028/118] afs: Fix race between post-modification dir edit and readdir/d_revalidate Greg Kroah-Hartman
2020-04-22 9:56 ` [PATCH 5.4 029/118] block, bfq: turn put_queue into release_process_ref in __bfq_bic_change_cgroup Greg Kroah-Hartman
2020-04-22 9:56 ` [PATCH 5.4 030/118] block, bfq: make reparent_leaf_entity actually work only on leaf entities Greg Kroah-Hartman
2020-04-22 9:56 ` [PATCH 5.4 031/118] block, bfq: invoke flush_idle_tree after reparent_active_queues in pd_offline Greg Kroah-Hartman
2020-04-22 9:56 ` [PATCH 5.4 032/118] rbd: avoid a deadlock on header_rwsem when flushing notifies Greg Kroah-Hartman
2020-04-22 9:56 ` [PATCH 5.4 033/118] rbd: call rbd_dev_unprobe() after unwatching and " Greg Kroah-Hartman
2020-04-22 9:56 ` [PATCH 5.4 034/118] x86/Hyper-V: Free hv_panic_page when fail to register kmsg dump Greg Kroah-Hartman
2020-04-22 9:56 ` [PATCH 5.4 035/118] drm/ttm: flush the fence on the bo after we individualize the reservation object Greg Kroah-Hartman
2020-04-22 9:56 ` [PATCH 5.4 036/118] clk: Dont cache errors from clk_ops::get_phase() Greg Kroah-Hartman
2020-04-22 9:56 ` [PATCH 5.4 037/118] clk: at91: usb: continue if clk_hw_round_rate() return zero Greg Kroah-Hartman
2020-04-22 9:56 ` [PATCH 5.4 038/118] net/mlx5e: Enforce setting of a single FEC mode Greg Kroah-Hartman
2020-04-22 9:56 ` [PATCH 5.4 039/118] f2fs: fix the panic in do_checkpoint() Greg Kroah-Hartman
2020-04-22 9:56 ` [PATCH 5.4 040/118] ARM: dts: rockchip: fix vqmmc-supply property name for rk3188-bqedison2qc Greg Kroah-Hartman
2020-04-22 9:56 ` [PATCH 5.4 041/118] arm64: dts: allwinner: a64: Fix display clock register range Greg Kroah-Hartman
2020-04-22 9:56 ` [PATCH 5.4 042/118] power: supply: bq27xxx_battery: Silence deferred-probe error Greg Kroah-Hartman
2020-04-22 9:56 ` [PATCH 5.4 043/118] clk: tegra: Fix Tegra PMC clock out parents Greg Kroah-Hartman
2020-04-22 9:56 ` [PATCH 5.4 044/118] arm64: tegra: Add PCIe endpoint controllers nodes for Tegra194 Greg Kroah-Hartman
2020-04-22 9:56 ` [PATCH 5.4 045/118] arm64: tegra: Fix Tegra194 PCIe compatible string Greg Kroah-Hartman
2020-04-22 9:56 ` [PATCH 5.4 046/118] arm64: dts: clearfog-gt-8k: set gigabit PHY reset deassert delay Greg Kroah-Hartman
2020-04-22 9:56 ` [PATCH 5.4 047/118] soc: imx: gpc: fix power up sequencing Greg Kroah-Hartman
2020-04-22 9:56 ` [PATCH 5.4 048/118] dma-coherent: fix integer overflow in the reserved-memory dma allocation Greg Kroah-Hartman
2020-04-22 9:56 ` [PATCH 5.4 049/118] rtc: 88pm860x: fix possible race condition Greg Kroah-Hartman
2020-04-22 9:56 ` [PATCH 5.4 050/118] NFS: alloc_nfs_open_context() must use the file cred when available Greg Kroah-Hartman
2020-04-22 9:56 ` [PATCH 5.4 051/118] NFSv4/pnfs: Return valid stateids in nfs_layout_find_inode_by_stateid() Greg Kroah-Hartman
2020-04-22 9:56 ` [PATCH 5.4 052/118] NFSv4.2: error out when relink swapfile Greg Kroah-Hartman
2020-04-22 9:56 ` [PATCH 5.4 053/118] ARM: dts: rockchip: fix lvds-encoder ports subnode for rk3188-bqedison2qc Greg Kroah-Hartman
2020-04-22 9:56 ` [PATCH 5.4 054/118] KVM: PPC: Book3S HV: Fix H_CEDE return code for nested guests Greg Kroah-Hartman
2020-04-22 9:56 ` [PATCH 5.4 055/118] f2fs: fix to show norecovery mount option Greg Kroah-Hartman
2020-04-22 9:56 ` [PATCH 5.4 056/118] phy: uniphier-usb3ss: Add Pro5 support Greg Kroah-Hartman
2020-04-22 9:56 ` [PATCH 5.4 057/118] NFS: direct.c: Fix memory leak of dreq when nfs_get_lock_context fails Greg Kroah-Hartman
2020-04-22 9:56 ` [PATCH 5.4 058/118] f2fs: Fix mount failure due to SPO after a successful online resize FS Greg Kroah-Hartman
2020-04-22 9:57 ` [PATCH 5.4 059/118] f2fs: Add a new CP flag to help fsck fix resize SPO issues Greg Kroah-Hartman
2020-04-22 9:57 ` [PATCH 5.4 060/118] s390/cpuinfo: fix wrong output when CPU0 is offline Greg Kroah-Hartman
2020-04-22 9:57 ` [PATCH 5.4 061/118] hibernate: Allow uswsusp to write to swap Greg Kroah-Hartman
2020-04-22 10:54 ` Marian Klein
2020-04-22 9:57 ` [PATCH 5.4 062/118] btrfs: add RCU locks around block group initialization Greg Kroah-Hartman
2020-04-22 9:57 ` [PATCH 5.4 063/118] powerpc/prom_init: Pass the "os-term" message to hypervisor Greg Kroah-Hartman
2020-04-22 9:57 ` [PATCH 5.4 064/118] powerpc/maple: Fix declaration made after definition Greg Kroah-Hartman
2020-04-22 9:57 ` [PATCH 5.4 065/118] s390/cpum_sf: Fix wrong page count in error message Greg Kroah-Hartman
2020-04-22 9:57 ` [PATCH 5.4 066/118] ext4: do not commit super on read-only bdev Greg Kroah-Hartman
2020-04-22 9:57 ` [PATCH 5.4 067/118] um: ubd: Prevent buffer overrun on command completion Greg Kroah-Hartman
2020-04-22 9:57 ` [PATCH 5.4 068/118] cifs: Allocate encryption header through kmalloc Greg Kroah-Hartman
2020-04-22 9:57 ` [PATCH 5.4 069/118] mm/hugetlb: fix build failure with HUGETLB_PAGE but not HUGEBTLBFS Greg Kroah-Hartman
2020-04-22 9:57 ` [PATCH 5.4 070/118] drm/nouveau/svm: check for SVM initialized before migrating Greg Kroah-Hartman
2020-04-22 9:57 ` [PATCH 5.4 071/118] drm/nouveau/svm: fix vma range check for migration Greg Kroah-Hartman
2020-04-22 9:57 ` [PATCH 5.4 072/118] include/linux/swapops.h: correct guards for non_swap_entry() Greg Kroah-Hartman
2020-04-22 9:57 ` [PATCH 5.4 073/118] percpu_counter: fix a data race at vm_committed_as Greg Kroah-Hartman
2020-04-22 9:57 ` [PATCH 5.4 074/118] compiler.h: fix error in BUILD_BUG_ON() reporting Greg Kroah-Hartman
2020-04-22 9:57 ` [PATCH 5.4 075/118] KVM: s390: vsie: Fix possible race when shadowing region 3 tables Greg Kroah-Hartman
2020-04-22 9:57 ` [PATCH 5.4 076/118] drm/nouveau: workaround runpm fail by disabling PCI power management on certain intel bridges Greg Kroah-Hartman
2020-04-22 9:57 ` [PATCH 5.4 077/118] leds: core: Fix warning message when init_data Greg Kroah-Hartman
2020-04-22 9:57 ` [PATCH 5.4 078/118] x86: ACPI: fix CPU hotplug deadlock Greg Kroah-Hartman
2020-04-22 9:57 ` [PATCH 5.4 079/118] csky: Fixup cpu speculative execution to IO area Greg Kroah-Hartman
2020-04-22 9:57 ` [PATCH 5.4 080/118] drm/amdkfd: kfree the wrong pointer Greg Kroah-Hartman
2020-04-22 9:57 ` [PATCH 5.4 081/118] NFS: Fix memory leaks in nfs_pageio_stop_mirroring() Greg Kroah-Hartman
2020-04-22 9:57 ` [PATCH 5.4 082/118] csky: Fixup get wrong psr value from phyical reg Greg Kroah-Hartman
2020-04-22 9:57 ` [PATCH 5.4 083/118] f2fs: fix NULL pointer dereference in f2fs_write_begin() Greg Kroah-Hartman
2020-04-22 9:57 ` [PATCH 5.4 084/118] ACPICA: Fixes for acpiExec namespace init file Greg Kroah-Hartman
2020-04-22 9:57 ` [PATCH 5.4 085/118] um: falloc.h needs to be directly included for older libc Greg Kroah-Hartman
2020-04-22 9:57 ` [PATCH 5.4 086/118] drm/vc4: Fix HDMI mode validation Greg Kroah-Hartman
2020-04-22 9:57 ` [PATCH 5.4 087/118] iommu/virtio: Fix freeing of incomplete domains Greg Kroah-Hartman
2020-04-22 9:57 ` [PATCH 5.4 088/118] iommu/vt-d: Fix mm reference leak Greg Kroah-Hartman
2020-04-22 9:57 ` [PATCH 5.4 089/118] SUNRPC: fix krb5p mount to provide large enough buffer in rq_rcvsize Greg Kroah-Hartman
2020-04-22 9:57 ` [PATCH 5.4 090/118] ext2: fix empty body warnings when -Wextra is used Greg Kroah-Hartman
2020-04-22 9:57 ` [PATCH 5.4 091/118] iommu/vt-d: Silence RCU-list debugging warning in dmar_find_atsr() Greg Kroah-Hartman
2020-04-22 9:57 ` [PATCH 5.4 092/118] iommu/vt-d: Fix page request descriptor size Greg Kroah-Hartman
2020-04-22 9:57 ` [PATCH 5.4 093/118] ext2: fix debug reference to ext2_xattr_cache Greg Kroah-Hartman
2020-04-22 9:57 ` [PATCH 5.4 094/118] sunrpc: Fix gss_unwrap_resp_integ() again Greg Kroah-Hartman
2020-04-22 9:57 ` [PATCH 5.4 095/118] csky: Fixup init_fpu compile warning with __init Greg Kroah-Hartman
2020-04-22 9:57 ` [PATCH 5.4 096/118] power: supply: axp288_fuel_gauge: Broaden vendor check for Intel Compute Sticks Greg Kroah-Hartman
2020-04-22 9:57 ` [PATCH 5.4 097/118] libnvdimm: Out of bounds read in __nd_ioctl() Greg Kroah-Hartman
2020-04-22 9:57 ` [PATCH 5.4 098/118] iommu/amd: Fix the configuration of GCR3 table root pointer Greg Kroah-Hartman
2020-04-22 9:57 ` [PATCH 5.4 099/118] f2fs: fix to wait all node page writeback Greg Kroah-Hartman
2020-04-22 9:57 ` [PATCH 5.4 100/118] drm/nouveau/gr/gp107,gp108: implement workaround for HW hanging during init Greg Kroah-Hartman
2020-04-22 9:57 ` [PATCH 5.4 101/118] net: dsa: bcm_sf2: Fix overflow checks Greg Kroah-Hartman
2020-04-22 9:57 ` [PATCH 5.4 102/118] dma-debug: fix displaying of dma allocation type Greg Kroah-Hartman
2020-04-22 9:57 ` [PATCH 5.4 103/118] fbdev: potential information leak in do_fb_ioctl() Greg Kroah-Hartman
2020-04-22 9:57 ` [PATCH 5.4 104/118] ARM: dts: sunxi: Fix DE2 clocks register range Greg Kroah-Hartman
2020-04-22 9:57 ` [PATCH 5.4 105/118] iio: si1133: read 24-bit signed integer for measurement Greg Kroah-Hartman
2020-04-22 9:57 ` [PATCH 5.4 106/118] fbmem: Adjust indentation in fb_prepare_logo and fb_blank Greg Kroah-Hartman
2020-04-22 9:57 ` [PATCH 5.4 107/118] tty: evh_bytechan: Fix out of bounds accesses Greg Kroah-Hartman
2020-04-22 9:57 ` [PATCH 5.4 108/118] locktorture: Print ratio of acquisitions, not failures Greg Kroah-Hartman
2020-04-22 9:57 ` [PATCH 5.4 109/118] mtd: rawnand: free the nand_device object Greg Kroah-Hartman
2020-04-22 9:57 ` [PATCH 5.4 110/118] mtd: spinand: Explicitly use MTD_OPS_RAW to write the bad block marker to OOB Greg Kroah-Hartman
2020-04-22 9:57 ` [PATCH 5.4 111/118] docs: Fix path to MTD command line partition parser Greg Kroah-Hartman
2020-04-22 9:57 ` [PATCH 5.4 112/118] mtd: lpddr: Fix a double free in probe() Greg Kroah-Hartman
2020-04-22 9:57 ` [PATCH 5.4 113/118] mtd: phram: fix a double free issue in error path Greg Kroah-Hartman
2020-04-22 9:57 ` [PATCH 5.4 114/118] KEYS: Dont write out to userspace while holding key semaphore Greg Kroah-Hartman
2020-04-22 9:57 ` [PATCH 5.4 115/118] bpf: fix buggy r0 retval refinement for tracing helpers Greg Kroah-Hartman
2020-04-22 9:57 ` [PATCH 5.4 116/118] bpf: Test_verifier, bpf_get_stack return value add <0 Greg Kroah-Hartman
2020-04-22 9:57 ` [PATCH 5.4 117/118] bpf: Test_progs, add test to catch retval refine error handling Greg Kroah-Hartman
2020-04-22 9:57 ` [PATCH 5.4 118/118] bpf, test_verifier: switch bpf_get_stacks 0 s> r8 test Greg Kroah-Hartman
2020-04-22 20:36 ` [PATCH 5.4 000/118] 5.4.35-rc1 review Guenter Roeck
2020-04-23 7:53 ` Naresh Kamboju
2020-04-23 10:22 ` Jon Hunter
2020-04-24 16:36 ` shuah
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=20200422095032.591782334@linuxfoundation.org \
--to=gregkh@linuxfoundation.org \
--cc=bp@suse.de \
--cc=jpoimboe@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mbenes@suse.cz \
--cc=peterz@infradead.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;
as well as URLs for NNTP newsgroup(s).