From: Greg Kroah-Hartman Date: Fri, 11 Mar 2022 08:59:59 +0000 (+0100) Subject: fix up some arm64 patches to be bisectable X-Git-Tag: v4.9.306~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3b3d4d6febb680fc101a7d65be8549ef487bad0d;p=thirdparty%2Fkernel%2Fstable-queue.git fix up some arm64 patches to be bisectable --- diff --git a/queue-5.10/arm64-add-percpu-vectors-for-el1.patch b/queue-5.10/arm64-add-percpu-vectors-for-el1.patch index d049fe0e874..0ffad3c9080 100644 --- a/queue-5.10/arm64-add-percpu-vectors-for-el1.patch +++ b/queue-5.10/arm64-add-percpu-vectors-for-el1.patch @@ -24,11 +24,11 @@ Reviewed-by: Catalin Marinas Signed-off-by: James Morse Signed-off-by: Greg Kroah-Hartman --- - arch/arm64/include/asm/vectors.h | 29 ++++++++++++++++++++++++++++- + arch/arm64/include/asm/vectors.h | 27 +++++++++++++++++++++++++++ arch/arm64/kernel/cpufeature.c | 11 +++++++++++ arch/arm64/kernel/entry.S | 12 ++++++------ arch/arm64/kvm/hyp/vhe/switch.c | 9 +++++++-- - 4 files changed, 52 insertions(+), 9 deletions(-) + 4 files changed, 51 insertions(+), 8 deletions(-) --- a/arch/arm64/include/asm/vectors.h +++ b/arch/arm64/include/asm/vectors.h @@ -48,13 +48,10 @@ Signed-off-by: Greg Kroah-Hartman /* * Note: the order of this enum corresponds to two arrays in entry.S: * tramp_vecs and __bp_harden_el1_vectors. By default the canonical -@@ -29,6 +38,24 @@ enum arm64_bp_harden_el1_vectors { - * Remap the kernel before branching to the canonical vectors. - */ +@@ -31,4 +40,22 @@ enum arm64_bp_harden_el1_vectors { EL1_VECTOR_KPTI, --+}; -+}; -+ + }; + +/* The vectors to use on return from EL0. e.g. to remap the kernel */ +DECLARE_PER_CPU_READ_MOSTLY(const char *, this_cpu_vector); + @@ -72,7 +69,7 @@ Signed-off-by: Greg Kroah-Hartman + + return __bp_harden_el1_vectors + SZ_2K * slot; +} - ++ #endif /* __ASM_VECTORS_H */ --- a/arch/arm64/kernel/cpufeature.c +++ b/arch/arm64/kernel/cpufeature.c diff --git a/queue-5.10/arm64-entry-add-vectors-that-have-the-bhb-mitigation-sequences.patch b/queue-5.10/arm64-entry-add-vectors-that-have-the-bhb-mitigation-sequences.patch index 998ddd2ab9f..d6c7c8135fd 100644 --- a/queue-5.10/arm64-entry-add-vectors-that-have-the-bhb-mitigation-sequences.patch +++ b/queue-5.10/arm64-entry-add-vectors-that-have-the-bhb-mitigation-sequences.patch @@ -95,7 +95,7 @@ Signed-off-by: Greg Kroah-Hartman + * Remap the kernel before branching to the canonical vectors. + */ + EL1_VECTOR_KPTI, -++}; ++}; + +#endif /* __ASM_VECTORS_H */ --- a/arch/arm64/kernel/entry.S diff --git a/queue-5.15/arm64-add-percpu-vectors-for-el1.patch b/queue-5.15/arm64-add-percpu-vectors-for-el1.patch index b64a5c836f8..f00aa84f529 100644 --- a/queue-5.15/arm64-add-percpu-vectors-for-el1.patch +++ b/queue-5.15/arm64-add-percpu-vectors-for-el1.patch @@ -24,11 +24,11 @@ Reviewed-by: Catalin Marinas Signed-off-by: James Morse Signed-off-by: Greg Kroah-Hartman --- - arch/arm64/include/asm/vectors.h | 29 ++++++++++++++++++++++++++++- + arch/arm64/include/asm/vectors.h | 27 +++++++++++++++++++++++++++ arch/arm64/kernel/cpufeature.c | 11 +++++++++++ arch/arm64/kernel/entry.S | 12 ++++++------ arch/arm64/kvm/hyp/vhe/switch.c | 9 +++++++-- - 4 files changed, 52 insertions(+), 9 deletions(-) + 4 files changed, 51 insertions(+), 8 deletions(-) --- a/arch/arm64/include/asm/vectors.h +++ b/arch/arm64/include/asm/vectors.h @@ -48,13 +48,10 @@ Signed-off-by: Greg Kroah-Hartman /* * Note: the order of this enum corresponds to two arrays in entry.S: * tramp_vecs and __bp_harden_el1_vectors. By default the canonical -@@ -29,6 +38,24 @@ enum arm64_bp_harden_el1_vectors { - * Remap the kernel before branching to the canonical vectors. - */ +@@ -31,4 +40,22 @@ enum arm64_bp_harden_el1_vectors { EL1_VECTOR_KPTI, --+}; -+}; -+ + }; + +/* The vectors to use on return from EL0. e.g. to remap the kernel */ +DECLARE_PER_CPU_READ_MOSTLY(const char *, this_cpu_vector); + @@ -72,7 +69,7 @@ Signed-off-by: Greg Kroah-Hartman + + return __bp_harden_el1_vectors + SZ_2K * slot; +} - ++ #endif /* __ASM_VECTORS_H */ --- a/arch/arm64/kernel/cpufeature.c +++ b/arch/arm64/kernel/cpufeature.c diff --git a/queue-5.15/arm64-entry-add-vectors-that-have-the-bhb-mitigation-sequences.patch b/queue-5.15/arm64-entry-add-vectors-that-have-the-bhb-mitigation-sequences.patch index 8baf527a0a1..8a766daae33 100644 --- a/queue-5.15/arm64-entry-add-vectors-that-have-the-bhb-mitigation-sequences.patch +++ b/queue-5.15/arm64-entry-add-vectors-that-have-the-bhb-mitigation-sequences.patch @@ -96,7 +96,7 @@ Signed-off-by: Greg Kroah-Hartman + * Remap the kernel before branching to the canonical vectors. + */ + EL1_VECTOR_KPTI, -++}; ++}; + +#endif /* __ASM_VECTORS_H */ --- a/arch/arm64/kernel/entry.S diff --git a/queue-5.16/arm64-add-percpu-vectors-for-el1.patch b/queue-5.16/arm64-add-percpu-vectors-for-el1.patch index 9c16086f202..e4ad9cbf79e 100644 --- a/queue-5.16/arm64-add-percpu-vectors-for-el1.patch +++ b/queue-5.16/arm64-add-percpu-vectors-for-el1.patch @@ -24,11 +24,11 @@ Reviewed-by: Catalin Marinas Signed-off-by: James Morse Signed-off-by: Greg Kroah-Hartman --- - arch/arm64/include/asm/vectors.h | 29 ++++++++++++++++++++++++++++- + arch/arm64/include/asm/vectors.h | 27 +++++++++++++++++++++++++++ arch/arm64/kernel/cpufeature.c | 11 +++++++++++ arch/arm64/kernel/entry.S | 12 ++++++------ arch/arm64/kvm/hyp/vhe/switch.c | 9 +++++++-- - 4 files changed, 52 insertions(+), 9 deletions(-) + 4 files changed, 51 insertions(+), 8 deletions(-) --- a/arch/arm64/include/asm/vectors.h +++ b/arch/arm64/include/asm/vectors.h @@ -48,13 +48,10 @@ Signed-off-by: Greg Kroah-Hartman /* * Note: the order of this enum corresponds to two arrays in entry.S: * tramp_vecs and __bp_harden_el1_vectors. By default the canonical -@@ -29,6 +38,24 @@ enum arm64_bp_harden_el1_vectors { - * Remap the kernel before branching to the canonical vectors. - */ +@@ -31,4 +40,22 @@ enum arm64_bp_harden_el1_vectors { EL1_VECTOR_KPTI, --+}; -+}; -+ + }; + +/* The vectors to use on return from EL0. e.g. to remap the kernel */ +DECLARE_PER_CPU_READ_MOSTLY(const char *, this_cpu_vector); + @@ -72,7 +69,7 @@ Signed-off-by: Greg Kroah-Hartman + + return __bp_harden_el1_vectors + SZ_2K * slot; +} - ++ #endif /* __ASM_VECTORS_H */ --- a/arch/arm64/kernel/cpufeature.c +++ b/arch/arm64/kernel/cpufeature.c diff --git a/queue-5.16/arm64-entry-add-vectors-that-have-the-bhb-mitigation-sequences.patch b/queue-5.16/arm64-entry-add-vectors-that-have-the-bhb-mitigation-sequences.patch index 48faefb889e..b87f7bb380d 100644 --- a/queue-5.16/arm64-entry-add-vectors-that-have-the-bhb-mitigation-sequences.patch +++ b/queue-5.16/arm64-entry-add-vectors-that-have-the-bhb-mitigation-sequences.patch @@ -96,7 +96,7 @@ Signed-off-by: Greg Kroah-Hartman + * Remap the kernel before branching to the canonical vectors. + */ + EL1_VECTOR_KPTI, -++}; ++}; + +#endif /* __ASM_VECTORS_H */ --- a/arch/arm64/kernel/entry.S