arm64: spectre: Rename spectre_v4_patch_fw_mitigation_conduit

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

 



From: James Morse <james.morse@xxxxxxx>

commit 1b33d4860deaecf1d8eec3061b7e7ed7ab0bae8d upstream.

The spectre-v4 sequence includes an SMC from the assembly entry code.
spectre_v4_patch_fw_mitigation_conduit is the patching callback that
generates an HVC or SMC depending on the SMCCC conduit type.

As this isn't specific to spectre-v4, rename it
smccc_patch_fw_mitigation_conduit so it can be re-used.

Reviewed-by: Russell King (Oracle) <rmk+kernel@xxxxxxxxxxxxxxx>
Reviewed-by: Catalin Marinas <catalin.marinas@xxxxxxx>
Signed-off-by: James Morse <james.morse@xxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 arch/arm64/kernel/entry.S       |    2 +-
 arch/arm64/kernel/proton-pack.c |    6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

--- a/arch/arm64/kernel/entry.S
+++ b/arch/arm64/kernel/entry.S
@@ -118,7 +118,7 @@ alternative_cb_end
 	tbnz	\tmp2, #TIF_SSBD, .L__asm_ssbd_skip\@
 	mov	w0, #ARM_SMCCC_ARCH_WORKAROUND_2
 	mov	w1, #\state
-alternative_cb	spectre_v4_patch_fw_mitigation_conduit
+alternative_cb	smccc_patch_fw_mitigation_conduit
 	nop					// Patched to SMC/HVC #0
 alternative_cb_end
 .L__asm_ssbd_skip\@:
--- a/arch/arm64/kernel/proton-pack.c
+++ b/arch/arm64/kernel/proton-pack.c
@@ -554,9 +554,9 @@ void __init spectre_v4_patch_fw_mitigati
  * Patch a NOP in the Spectre-v4 mitigation code with an SMC/HVC instruction
  * to call into firmware to adjust the mitigation state.
  */
-void __init spectre_v4_patch_fw_mitigation_conduit(struct alt_instr *alt,
-						   __le32 *origptr,
-						   __le32 *updptr, int nr_inst)
+void __init smccc_patch_fw_mitigation_conduit(struct alt_instr *alt,
+					       __le32 *origptr,
+					       __le32 *updptr, int nr_inst)
 {
 	u32 insn;
 


Patches currently in stable-queue which might be from james.morse@xxxxxxx are

queue-5.16/arm64-entry-add-macro-for-reading-symbol-addresses-from-the-trampoline.patch
queue-5.16/arm64-use-the-clearbhb-instruction-in-mitigations.patch
queue-5.16/arm64-add-percpu-vectors-for-el1.patch
queue-5.16/arm64-entry-free-up-another-register-on-kpti-s-tramp_exit-path.patch
queue-5.16/arm64-entry-don-t-assume-tramp_vectors-is-the-start-of-the-vectors.patch
queue-5.16/arm64-entry-make-the-trampoline-cleanup-optional.patch
queue-5.16/arm64-proton-pack-include-unprivileged-ebpf-status-in-spectre-v2-mitigation-reporting.patch
queue-5.16/arm64-entry-add-non-kpti-__bp_harden_el1_vectors-for-mitigations.patch
queue-5.16/arm64-add-id_aa64isar2_el1-sys-register.patch
queue-5.16/kvm-arm64-allow-smccc_arch_workaround_3-to-be-discovered-and-migrated.patch
queue-5.16/arm64-spectre-rename-spectre_v4_patch_fw_mitigation_conduit.patch
queue-5.16/arm64-entry-move-trampoline-macros-out-of-ifdef-d-section.patch
queue-5.16/arm64-entry-allow-tramp_alias-to-access-symbols-after-the-4k-boundary.patch
queue-5.16/arm64-entry-move-the-trampoline-data-page-before-the-text-page.patch
queue-5.16/arm64-entry.s-add-ventry-overflow-sanity-checks.patch
queue-5.16/arm64-entry-add-vectors-that-have-the-bhb-mitigation-sequences.patch
queue-5.16/arm64-mitigate-spectre-style-branch-history-side-channels.patch
queue-5.16/arm64-entry-allow-the-trampoline-text-to-occupy-multiple-pages.patch
queue-5.16/arm64-proton-pack-report-spectre-bhb-vulnerabilities-as-part-of-spectre-v2.patch
queue-5.16/kvm-arm64-allow-indirect-vectors-to-be-used-without-spectre_v3a.patch
queue-5.16/arm64-entry-make-the-kpti-trampoline-s-kpti-sequence-optional.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