linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	stable@vger.kernel.org, Randy Dunlap <rdunlap@infradead.org>,
	kernel test robot <lkp@intel.com>,
	Russell King <rmk+kernel@armlinux.org.uk>,
	Catalin Marinas <catalin.marinas@arm.com>,
	linux-arm-kernel@lists.infradead.org, patches@armlinux.org.uk,
	Linus Torvalds <torvalds@linux-foundation.org>
Subject: [PATCH 5.4 29/43] ARM: Spectre-BHB: provide empty stub for non-config
Date: Mon, 14 Mar 2022 12:53:40 +0100	[thread overview]
Message-ID: <20220314112735.237801373@linuxfoundation.org> (raw)
In-Reply-To: <20220314112734.415677317@linuxfoundation.org>

From: Randy Dunlap <rdunlap@infradead.org>

commit 68453767131a5deec1e8f9ac92a9042f929e585d upstream.

When CONFIG_GENERIC_CPU_VULNERABILITIES is not set, references
to spectre_v2_update_state() cause a build error, so provide an
empty stub for that function when the Kconfig option is not set.

Fixes this build error:

  arm-linux-gnueabi-ld: arch/arm/mm/proc-v7-bugs.o: in function `cpu_v7_bugs_init':
  proc-v7-bugs.c:(.text+0x52): undefined reference to `spectre_v2_update_state'
  arm-linux-gnueabi-ld: proc-v7-bugs.c:(.text+0x82): undefined reference to `spectre_v2_update_state'

Fixes: b9baf5c8c5c3 ("ARM: Spectre-BHB workaround")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Reported-by: kernel test robot <lkp@intel.com>
Cc: Russell King <rmk+kernel@armlinux.org.uk>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: patches@armlinux.org.uk
Acked-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 arch/arm/include/asm/spectre.h |    6 ++++++
 1 file changed, 6 insertions(+)

--- a/arch/arm/include/asm/spectre.h
+++ b/arch/arm/include/asm/spectre.h
@@ -25,7 +25,13 @@ enum {
 	SPECTRE_V2_METHOD_LOOP8 = BIT(__SPECTRE_V2_METHOD_LOOP8),
 };
 
+#ifdef CONFIG_GENERIC_CPU_VULNERABILITIES
 void spectre_v2_update_state(unsigned int state, unsigned int methods);
+#else
+static inline void spectre_v2_update_state(unsigned int state,
+					   unsigned int methods)
+{}
+#endif
 
 int spectre_bhb_update_vectors(unsigned int method);
 



  parent reply	other threads:[~2022-03-14 11:57 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-14 11:53 [PATCH 5.4 00/43] 5.4.185-rc1 review Greg Kroah-Hartman
2022-03-14 11:53 ` [PATCH 5.4 01/43] clk: qcom: gdsc: Add support to update GDSC transition delay Greg Kroah-Hartman
2022-03-14 11:53 ` [PATCH 5.4 02/43] arm64: dts: armada-3720-turris-mox: Add missing ethernet0 alias Greg Kroah-Hartman
2022-03-14 11:53 ` [PATCH 5.4 03/43] virtio-blk: Dont use MAX_DISCARD_SEGMENTS if max_discard_seg is zero Greg Kroah-Hartman
2022-03-14 11:53 ` [PATCH 5.4 04/43] net: qlogic: check the return value of dma_alloc_coherent() in qed_vf_hw_prepare() Greg Kroah-Hartman
2022-03-14 11:53 ` [PATCH 5.4 05/43] qed: return status of qed_iov_get_link Greg Kroah-Hartman
2022-03-14 11:53 ` [PATCH 5.4 06/43] drm/sun4i: mixer: Fix P010 and P210 format numbers Greg Kroah-Hartman
2022-03-14 11:53 ` [PATCH 5.4 07/43] ARM: dts: aspeed: Fix AST2600 quad spi group Greg Kroah-Hartman
2022-03-14 11:53 ` [PATCH 5.4 08/43] ethernet: Fix error handling in xemaclite_of_probe Greg Kroah-Hartman
2022-03-14 11:53 ` [PATCH 5.4 09/43] net: ethernet: ti: cpts: Handle error for clk_enable Greg Kroah-Hartman
2022-03-14 11:53 ` [PATCH 5.4 10/43] net: ethernet: lpc_eth: " Greg Kroah-Hartman
2022-03-14 11:53 ` [PATCH 5.4 11/43] ax25: Fix NULL pointer dereference in ax25_kill_by_device Greg Kroah-Hartman
2022-03-14 11:53 ` [PATCH 5.4 12/43] net/mlx5: Fix size field in bufferx_reg struct Greg Kroah-Hartman
2022-03-14 11:53 ` [PATCH 5.4 13/43] net/mlx5: Fix a race on command flush flow Greg Kroah-Hartman
2022-03-14 11:53 ` [PATCH 5.4 14/43] NFC: port100: fix use-after-free in port100_send_complete Greg Kroah-Hartman
2022-03-14 11:53 ` [PATCH 5.4 15/43] selftests: pmtu.sh: Kill tcpdump processes launched by subshell Greg Kroah-Hartman
2022-03-14 11:53 ` [PATCH 5.4 16/43] gpio: ts4900: Do not set DAT and OE together Greg Kroah-Hartman
2022-03-14 11:53 ` [PATCH 5.4 17/43] gianfar: ethtool: Fix refcount leak in gfar_get_ts_info Greg Kroah-Hartman
2022-03-14 11:53 ` [PATCH 5.4 18/43] net: phy: DP83822: clear MISR2 register to disable interrupts Greg Kroah-Hartman
2022-03-14 11:53 ` [PATCH 5.4 19/43] sctp: fix kernel-infoleak for SCTP sockets Greg Kroah-Hartman
2022-03-14 11:53 ` [PATCH 5.4 20/43] net: bcmgenet: Dont claim WOL when its not available Greg Kroah-Hartman
2022-03-14 11:53 ` [PATCH 5.4 21/43] selftests/bpf: Add test for bpf_timer overwriting crash Greg Kroah-Hartman
2022-03-18  7:27   ` Rantala, Tommi T. (Nokia - FI/Espoo)
2022-03-21 12:46     ` gregkh
2022-03-14 11:53 ` [PATCH 5.4 22/43] net-sysfs: add check for netdevice being present to speed_show Greg Kroah-Hartman
2022-03-14 11:53 ` [PATCH 5.4 23/43] Revert "xen-netback: remove hotplug-status once it has served its purpose" Greg Kroah-Hartman
2022-03-14 11:53 ` [PATCH 5.4 24/43] Revert "xen-netback: Check for hotplug-status existence before watching" Greg Kroah-Hartman
2022-03-14 11:53 ` [PATCH 5.4 25/43] ipv6: prevent a possible race condition with lifetimes Greg Kroah-Hartman
2022-03-14 11:53 ` [PATCH 5.4 26/43] tracing: Ensure trace buffer is at least 4096 bytes large Greg Kroah-Hartman
2022-03-14 11:53 ` [PATCH 5.4 27/43] selftest/vm: fix map_fixed_noreplace test failure Greg Kroah-Hartman
2022-03-14 11:53 ` [PATCH 5.4 28/43] selftests/memfd: clean up mapping in mfd_fail_write Greg Kroah-Hartman
2022-03-14 11:53 ` Greg Kroah-Hartman [this message]
2022-03-14 11:53 ` [PATCH 5.4 30/43] fuse: fix pipe buffer lifetime for direct_io Greg Kroah-Hartman
2022-03-14 11:53 ` [PATCH 5.4 31/43] staging: gdm724x: fix use after free in gdm_lte_rx() Greg Kroah-Hartman
2022-03-14 11:53 ` [PATCH 5.4 32/43] net: macb: Fix lost RX packet wakeup race in NAPI receive Greg Kroah-Hartman
2022-03-14 11:53 ` [PATCH 5.4 33/43] mmc: meson: Fix usage of meson_mmc_post_req() Greg Kroah-Hartman
2022-03-14 11:53 ` [PATCH 5.4 34/43] riscv: Fix auipc+jalr relocation range checks Greg Kroah-Hartman
2022-03-14 11:53 ` [PATCH 5.4 35/43] arm64: dts: marvell: armada-37xx: Remap IO space to bus address 0x0 Greg Kroah-Hartman
2022-03-14 11:53 ` [PATCH 5.4 36/43] virtio: unexport virtio_finalize_features Greg Kroah-Hartman
2022-03-14 11:53 ` [PATCH 5.4 37/43] virtio: acknowledge all features before access Greg Kroah-Hartman
2022-03-14 11:53 ` [PATCH 5.4 38/43] ARM: fix Thumb2 regression with Spectre BHB Greg Kroah-Hartman
2022-03-14 11:53 ` [PATCH 5.4 39/43] ext4: add check to prevent attempting to resize an fs with sparse_super2 Greg Kroah-Hartman
2022-03-14 11:53 ` [PATCH 5.4 40/43] x86/cpufeatures: Mark two free bits in word 3 Greg Kroah-Hartman
2022-03-14 11:53 ` [PATCH 5.4 41/43] x86/cpu: Add hardware-enforced cache coherency as a CPUID feature Greg Kroah-Hartman
2022-03-14 11:53 ` [PATCH 5.4 42/43] x86/mm/pat: Dont flush cache if hardware enforces cache coherency across encryption domnains Greg Kroah-Hartman
2022-03-14 11:53 ` [PATCH 5.4 43/43] KVM: SVM: Dont flush cache if hardware enforces cache coherency across encryption domains Greg Kroah-Hartman
2022-03-14 21:11 ` [PATCH 5.4 00/43] 5.4.185-rc1 review Florian Fainelli
2022-03-15  0:52 ` Guenter Roeck
2022-03-15  9:41 ` Naresh Kamboju
2022-03-15 12:29 ` Sudip Mukherjee
2022-03-16  0:54 ` Samuel Zou

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=20220314112735.237801373@linuxfoundation.org \
    --to=gregkh@linuxfoundation.org \
    --cc=catalin.marinas@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=patches@armlinux.org.uk \
    --cc=rdunlap@infradead.org \
    --cc=rmk+kernel@armlinux.org.uk \
    --cc=stable@vger.kernel.org \
    --cc=torvalds@linux-foundation.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).