Patch "x86/ibt: Add ANNOTATE_NOENDBR" has been added to the 5.10-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    x86/ibt: Add ANNOTATE_NOENDBR

to the 5.10-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     x86-ibt-add-annotate_noendbr.patch
and it can be found in the queue-5.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From f3c95380a42cc13f671c4325103c22379c468342 Mon Sep 17 00:00:00 2001
From: Sasha Levin <sashal@xxxxxxxxxx>
Date: Tue, 8 Mar 2022 16:30:18 +0100
Subject: x86/ibt: Add ANNOTATE_NOENDBR

From: Peter Zijlstra <peterz@xxxxxxxxxxxxx>

[ Upstream commit c8c301abeae58ec756b8fcb2178a632bd3c9e284 ]

In order to have objtool warn about code references to !ENDBR
instruction, we need an annotation to allow this for non-control-flow
instances -- consider text range checks, text patching, or return
trampolines etc.

Signed-off-by: Peter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx>
Reviewed-by: Kees Cook <keescook@xxxxxxxxxxxx>
Acked-by: Josh Poimboeuf <jpoimboe@xxxxxxxxxx>
Link: https://lore.kernel.org/r/20220308154317.578968224@xxxxxxxxxxxxx
Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>
---
 include/linux/objtool.h       |   16 ++++++++++++++++
 tools/include/linux/objtool.h |   16 ++++++++++++++++
 2 files changed, 32 insertions(+)

--- a/include/linux/objtool.h
+++ b/include/linux/objtool.h
@@ -82,6 +82,12 @@ struct unwind_hint {
 #define STACK_FRAME_NON_STANDARD_FP(func)
 #endif
 
+#define ANNOTATE_NOENDBR					\
+	"986: \n\t"						\
+	".pushsection .discard.noendbr\n\t"			\
+	_ASM_PTR " 986b\n\t"					\
+	".popsection\n\t"
+
 #else /* __ASSEMBLY__ */
 
 /*
@@ -128,6 +134,13 @@ struct unwind_hint {
 	.popsection
 .endm
 
+.macro ANNOTATE_NOENDBR
+.Lhere_\@:
+	.pushsection .discard.noendbr
+	.quad	.Lhere_\@
+	.popsection
+.endm
+
 #endif /* __ASSEMBLY__ */
 
 #else /* !CONFIG_STACK_VALIDATION */
@@ -138,10 +151,13 @@ struct unwind_hint {
 	"\n\t"
 #define STACK_FRAME_NON_STANDARD(func)
 #define STACK_FRAME_NON_STANDARD_FP(func)
+#define ANNOTATE_NOENDBR
 #else
 #define ANNOTATE_INTRA_FUNCTION_CALL
 .macro UNWIND_HINT type:req sp_reg=0 sp_offset=0 end=0
 .endm
+.macro ANNOTATE_NOENDBR
+.endm
 #endif
 
 #endif /* CONFIG_STACK_VALIDATION */
--- a/tools/include/linux/objtool.h
+++ b/tools/include/linux/objtool.h
@@ -82,6 +82,12 @@ struct unwind_hint {
 #define STACK_FRAME_NON_STANDARD_FP(func)
 #endif
 
+#define ANNOTATE_NOENDBR					\
+	"986: \n\t"						\
+	".pushsection .discard.noendbr\n\t"			\
+	_ASM_PTR " 986b\n\t"					\
+	".popsection\n\t"
+
 #else /* __ASSEMBLY__ */
 
 /*
@@ -128,6 +134,13 @@ struct unwind_hint {
 	.popsection
 .endm
 
+.macro ANNOTATE_NOENDBR
+.Lhere_\@:
+	.pushsection .discard.noendbr
+	.quad	.Lhere_\@
+	.popsection
+.endm
+
 #endif /* __ASSEMBLY__ */
 
 #else /* !CONFIG_STACK_VALIDATION */
@@ -138,10 +151,13 @@ struct unwind_hint {
 	"\n\t"
 #define STACK_FRAME_NON_STANDARD(func)
 #define STACK_FRAME_NON_STANDARD_FP(func)
+#define ANNOTATE_NOENDBR
 #else
 #define ANNOTATE_INTRA_FUNCTION_CALL
 .macro UNWIND_HINT type:req sp_reg=0 sp_offset=0 end=0
 .endm
+.macro ANNOTATE_NOENDBR
+.endm
 #endif
 
 #endif /* CONFIG_STACK_VALIDATION */


Patches currently in stable-queue which might be from sashal@xxxxxxxxxx are

queue-5.10/team-fix-incorrect-deletion-of-eth_p_8021ad-protocol.patch
queue-5.10/virtio-mmio-use-to_virtio_mmio_device-to-simply-code.patch
queue-5.10/gfs2-fix-possible-data-races-in-gfs2_show_options.patch
queue-5.10/arm64-dts-rockchip-sort-nodes-properties-on-rk3399-r.patch
queue-5.10/xfrm-add-forgotten-nla_policy-for-xfrma_mtimer_thres.patch
queue-5.10/irqchip-mips-gic-get-rid-of-the-reliance-on-irq_cpu_.patch
queue-5.10/x86-cpu-fix-up-srso_safe_ret-and-__x86_return_thunk.patch
queue-5.10/tracing-probes-have-process_fetch_insn-take-a-void-i.patch
queue-5.10/quota-properly-disable-quotas-when-add_dquot_ref-fai.patch
queue-5.10/irqchip-mips-gic-use-raw-spinlock-for-gic_lock.patch
queue-5.10/x86-static_call-fix-__static_call_fixup.patch
queue-5.10/riscv-uaccess-return-the-number-of-bytes-effectively.patch
queue-5.10/asoc-intel-sof_sdw-add-quirk-for-mtl-rvp.patch
queue-5.10/usb-chipidea-imx-don-t-request-qos-for-imx8ulp.patch
queue-5.10/bus-mhi-host-range-check-chdboff-and-erdboff.patch
queue-5.10/bluetooth-l2cap-fix-use-after-free.patch
queue-5.10/usb-chipidea-imx-add-missing-usb-phy-dpdm-wakeup-set.patch
queue-5.10/arm-dts-imx6dl-prtrvt-prtvt7-prti6q-prtwd2-fix-usb-r.patch
queue-5.10/iio-adc-stx104-implement-and-utilize-register-struct.patch
queue-5.10/sock-fix-misuse-of-sk_under_memory_pressure.patch
queue-5.10/arm64-dts-rockchip-use-usb-host-by-default-on-rk3399.patch
queue-5.10/ovl-check-type-and-offset-of-struct-vfsmount-in-ovl_.patch
queue-5.10/serial-8250-fix-oops-for-port-pm-on-uart_change_pm.patch
queue-5.10/selftests-mirror_gre_changes-tighten-up-the-ttl-test.patch
queue-5.10/xfrm-add-null-check-in-xfrm_update_ae_params.patch
queue-5.10/mmc-bcm2835-fix-deferred-probing.patch
queue-5.10/macsec-use-dev_stats_inc.patch
queue-5.10/iopoll-call-cpu_relax-in-busy-loops.patch
queue-5.10/usb-gadget-udc-core-introduce-check_config-to-verify.patch
queue-5.10/riscv-lib-uaccess-fold-fixups-into-body.patch
queue-5.10/virtio-mmio-don-t-break-lifecycle-of-vm_dev.patch
queue-5.10/fs-jfs-fix-ubsan-array-index-out-of-bounds-in-dballo.patch
queue-5.10/rdma-mlx5-return-the-firmware-result-upon-destroying.patch
queue-5.10/x86-ibt-add-annotate_noendbr.patch
queue-5.10/mmc-meson-gx-use-devm_mmc_alloc_host.patch
queue-5.10/bluetooth-btusb-add-mt7922-bluetooth-id-for-the-asus.patch
queue-5.10/drm-panel-simple-fix-auo-g121ean01-panel-timings-acc.patch
queue-5.10/riscv-lib-uaccess-fix-csr_status-sr_sum-bit.patch
queue-5.10/mips-dec-prom-address-warray-bounds-warning.patch
queue-5.10/bus-mhi-move-host-mhi-code-to-host-directory.patch
queue-5.10/net-mlx5-refactor-init-clock-function.patch
queue-5.10/asoc-intel-sof_sdw-add-quirk-for-lnl-rvp.patch
queue-5.10/mmc-sdhci-f-sdh30-replace-with-sdhci_pltfm.patch
queue-5.10/dma-remap-use-kvmalloc_array-kvfree-for-larger-dma-m.patch
queue-5.10/drm-amdgpu-install-stub-fence-into-potential-unused-.patch
queue-5.10/arm64-dts-rockchip-fix-regulator-name-on-rk3399-rock.patch
queue-5.10/alsa-emu10k1-roll-up-loops-in-dsp-setup-code-for-aud.patch
queue-5.10/net-mlx5-move-all-internal-timer-metadata-into-a-ded.patch
queue-5.10/bus-ti-sysc-flush-posted-write-on-enable-before-rese.patch
queue-5.10/udf-fix-uninitialized-array-access-for-some-pathname.patch
queue-5.10/fs-jfs-check-for-read-only-mounted-filesystem-in-txb.patch
queue-5.10/drm-amdgpu-fix-potential-fence-use-after-free-v2.patch
queue-5.10/tracing-probes-fix-to-update-dynamic-data-counter-if.patch
queue-5.10/arm64-dts-rockchip-disable-hs400-for-emmc-on-rock-pi.patch
queue-5.10/alsa-hda-realtek-remodified-3k-pull-low-procedure.patch
queue-5.10/bus-mhi-add-mhi-pci-support-for-wwan-modems.patch
queue-5.10/ipvs-fix-racy-memcpy-in-proc_do_sync_threshold.patch
queue-5.10/mmc-sunxi-fix-deferred-probing.patch
queue-5.10/drm-radeon-fix-integer-overflow-in-radeon_cs_parser_.patch
queue-5.10/net-ncsi-change-from-ndo_set_mac_address-to-dev_set_.patch
queue-5.10/asoc-intel-sof_sdw-add-support-for-rex-soundwire.patch
queue-5.10/arm64-dts-rockchip-add-es8316-codec-for-rock-pi-4.patch
queue-5.10/usb-cdns3-allocate-tx-fifo-size-according-to-composi.patch
queue-5.10/mmc-core-add-devm_mmc_alloc_host.patch
queue-5.10/usb-cdnsp-device-side-header-file-for-cdnsp-driver.patch
queue-5.10/iio-adc-stx104-utilize-iomap-interface.patch
queue-5.10/macsec-fix-traffic-counters-statistics.patch
queue-5.10/asoc-rt5665-add-missed-regulator_bulk_disable.patch
queue-5.10/usb-gadget-u_serial-avoid-spinlock-recursion-in-__gs.patch
queue-5.10/media-v4l2-mem2mem-add-lock-to-protect-parameter-num.patch
queue-5.10/alsa-hda-fix-a-possible-null-pointer-dereference-due.patch
queue-5.10/dt-bindings-iio-add-ad74413r.patch
queue-5.10/usb-cdns3-fix-ncm-gadget-rx-speed-20x-slow-than-expe.patch
queue-5.10/objtool-add-frame-pointer-specific-function-ignore.patch
queue-5.10/i40e-fix-misleading-debug-logs.patch
queue-5.10/powerpc-kasan-disable-kcov-in-kasan-code.patch
queue-5.10/iio-add-addac-subdirectory.patch
queue-5.10/xfrm-fix-slab-use-after-free-in-decode_session6.patch
queue-5.10/net-phy-broadcom-stub-c45-read-write-for-54810.patch
queue-5.10/iio-addac-stx104-fix-race-condition-when-converting-.patch
queue-5.10/quota-fix-warning-in-dqgrab.patch
queue-5.10/media-platform-mediatek-vpu-fix-null-ptr-dereference.patch
queue-5.10/usb-dwc3-qcom-fix-null-deref-on-suspend.patch
queue-5.10/riscv-__asm_copy_to-from_user-optimize-unaligned-mem.patch
queue-5.10/ima-allow-fix-uml-builds.patch
queue-5.10/fs-jfs-fix-null-ptr-deref-read-in-txbegin.patch
queue-5.10/asoc-meson-axg-tdm-formatter-fix-channel-slot-alloca.patch
queue-5.10/iio-addac-stx104-fix-race-condition-for-stx104_write.patch
queue-5.10/mmc-meson-gx-fix-deferred-probing.patch
queue-5.10/ip6_vti-fix-slab-use-after-free-in-decode_session6.patch
queue-5.10/netfilter-nft_dynset-disallow-object-maps.patch
queue-5.10/arm64-dts-rockchip-fix-supplies-on-rk3399-rock-pi-4.patch
queue-5.10/pci-tegra194-fix-possible-array-out-of-bounds-access.patch
queue-5.10/net-do-not-allow-gso_size-to-be-set-to-gso_by_frags.patch
queue-5.10/net-dsa-mv88e6xxx-wait-for-eeprom-done-before-hw-res.patch
queue-5.10/net-xfrm-fix-xfrm_address_filter-oob-read.patch
queue-5.10/hid-add-quirk-for-03f0-464a-hp-elite-presenter-mouse.patch
queue-5.10/ring-buffer-do-not-swap-cpu_buffer-during-resize-pro.patch
queue-5.10/ip_vti-fix-potential-slab-use-after-free-in-decode_s.patch
queue-5.10/net-mlx5-skip-clock-update-work-when-device-is-in-er.patch
queue-5.10/net-af_key-fix-sadb_x_filter-validation.patch
queue-5.10/arm64-dts-rockchip-add-spdif-node-for-rock-pi-4.patch
queue-5.10/pcmcia-rsrc_nonstatic-fix-memory-leak-in-nonstatic_r.patch
queue-5.10/alsa-hda-realtek-add-quirks-for-unis-h3c-desktop-b76.patch
queue-5.10/bus-mhi-add-mmio-region-length-to-controller-structu.patch
queue-5.10/net-xfrm-amend-xfrma_sec_ctx-nla_policy-structure.patch



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux