This repository has been archived by the owner on Jun 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changes in 4.14.275 arm64: arch_timer: Add workaround for ARM erratum 1188873 arm64: arch_timer: avoid unused function warning arm64: Add silicon-errata.txt entry for ARM erratum 1188873 arm64: Make ARM64_ERRATUM_1188873 depend on COMPAT arm64: Add part number for Neoverse N1 arm64: Add part number for Arm Cortex-A77 arm64: Add Neoverse-N2, Cortex-A710 CPU part definition arm64: Add Cortex-X2 CPU part definition arm64: entry.S: Add ventry overflow sanity checks arm64: entry: Make the trampoline cleanup optional arm64: entry: Free up another register on kpti's tramp_exit path arm64: entry: Move the trampoline data page before the text page arm64: entry: Allow tramp_alias to access symbols after the 4K boundary arm64: entry: Don't assume tramp_vectors is the start of the vectors arm64: entry: Move trampoline macros out of ifdef'd section arm64: entry: Make the kpti trampoline's kpti sequence optional arm64: entry: Allow the trampoline text to occupy multiple pages arm64: entry: Add non-kpti __bp_harden_el1_vectors for mitigations arm64: entry: Add vectors that have the bhb mitigation sequences arm64: entry: Add macro for reading symbol addresses from the trampoline arm64: Add percpu vectors for EL1 arm64: proton-pack: Report Spectre-BHB vulnerabilities as part of Spectre-v2 KVM: arm64: Add templates for BHB mitigation sequences arm64: Mitigate spectre style branch history side channels KVM: arm64: Allow SMCCC_ARCH_WORKAROUND_3 to be discovered and migrated arm64: add ID_AA64ISAR2_EL1 sys register arm64: Use the clearbhb instruction in mitigations Linux 4.14.275 Signed-off-by: Greg Kroah-Hartman <[email protected]> Change-Id: I73cce44ca3fc70852c2aa9cf148914a80b78f173
- Loading branch information
Showing
28 changed files
with
908 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
/* SPDX-License-Identifier: GPL-2.0-only */ | ||
/* | ||
* Copyright (C) 2022 ARM Ltd. | ||
*/ | ||
#ifndef __ASM_VECTORS_H | ||
#define __ASM_VECTORS_H | ||
|
||
#include <linux/bug.h> | ||
#include <linux/percpu.h> | ||
|
||
#include <asm/fixmap.h> | ||
#include <asm/mmu.h> | ||
|
||
extern char vectors[]; | ||
extern char tramp_vectors[]; | ||
extern char __bp_harden_el1_vectors[]; | ||
|
||
/* | ||
* Note: the order of this enum corresponds to two arrays in entry.S: | ||
* tramp_vecs and __bp_harden_el1_vectors. By default the canonical | ||
* 'full fat' vectors are used directly. | ||
*/ | ||
enum arm64_bp_harden_el1_vectors { | ||
#ifdef CONFIG_MITIGATE_SPECTRE_BRANCH_HISTORY | ||
/* | ||
* Perform the BHB loop mitigation, before branching to the canonical | ||
* vectors. | ||
*/ | ||
EL1_VECTOR_BHB_LOOP, | ||
|
||
/* | ||
* Make the SMC call for firmware mitigation, before branching to the | ||
* canonical vectors. | ||
*/ | ||
EL1_VECTOR_BHB_FW, | ||
|
||
/* | ||
* Use the ClearBHB instruction, before branching to the canonical | ||
* vectors. | ||
*/ | ||
EL1_VECTOR_BHB_CLEAR_INSN, | ||
#endif /* CONFIG_MITIGATE_SPECTRE_BRANCH_HISTORY */ | ||
|
||
/* | ||
* Remap the kernel before branching to the canonical vectors. | ||
*/ | ||
EL1_VECTOR_KPTI, | ||
}; | ||
|
||
#ifndef CONFIG_MITIGATE_SPECTRE_BRANCH_HISTORY | ||
#define EL1_VECTOR_BHB_LOOP -1 | ||
#define EL1_VECTOR_BHB_FW -1 | ||
#define EL1_VECTOR_BHB_CLEAR_INSN -1 | ||
#endif /* !CONFIG_MITIGATE_SPECTRE_BRANCH_HISTORY */ | ||
|
||
/* The vectors to use on return from EL0. e.g. to remap the kernel */ | ||
DECLARE_PER_CPU_READ_MOSTLY(const char *, this_cpu_vector); | ||
|
||
#ifndef CONFIG_UNMAP_KERNEL_AT_EL0 | ||
#define TRAMP_VALIAS 0 | ||
#endif | ||
|
||
static inline const char * | ||
arm64_get_bp_hardening_vector(enum arm64_bp_harden_el1_vectors slot) | ||
{ | ||
if (arm64_kernel_unmapped_at_el0()) | ||
return (char *)TRAMP_VALIAS + SZ_2K * slot; | ||
|
||
WARN_ON_ONCE(slot == EL1_VECTOR_KPTI); | ||
|
||
return __bp_harden_el1_vectors + SZ_2K * slot; | ||
} | ||
|
||
#endif /* __ASM_VECTORS_H */ |
Oops, something went wrong.