From: Greg Kroah-Hartman Date: Wed, 15 Aug 2018 05:53:37 +0000 (+0200) Subject: 4.4-stable patches X-Git-Tag: v4.18.1~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f668eab43820bb15c73b8a7dcaee1a78ea0dd169;p=thirdparty%2Fkernel%2Fstable-queue.git 4.4-stable patches added patches: x86-speculation-l1tf-unbreak-__have_arch_pfn_modify_allowed-architectures.patch --- diff --git a/queue-4.4/series b/queue-4.4/series index 13d31d8eb20..ca5884acd0a 100644 --- a/queue-4.4/series +++ b/queue-4.4/series @@ -42,3 +42,4 @@ x86-mm-pat-make-set_memory_np-l1tf-safe.patch x86-mm-kmmio-make-the-tracer-robust-against-l1tf.patch x86-speculation-l1tf-fix-up-cpu-feature-flags.patch x86-init-fix-build-with-config_swap-n.patch +x86-speculation-l1tf-unbreak-__have_arch_pfn_modify_allowed-architectures.patch diff --git a/queue-4.4/x86-speculation-l1tf-unbreak-__have_arch_pfn_modify_allowed-architectures.patch b/queue-4.4/x86-speculation-l1tf-unbreak-__have_arch_pfn_modify_allowed-architectures.patch new file mode 100644 index 00000000000..beb6205fc8d --- /dev/null +++ b/queue-4.4/x86-speculation-l1tf-unbreak-__have_arch_pfn_modify_allowed-architectures.patch @@ -0,0 +1,63 @@ +From 6c26fcd2abfe0a56bbd95271fce02df2896cfd24 Mon Sep 17 00:00:00 2001 +From: Jiri Kosina +Date: Sat, 14 Jul 2018 21:56:13 +0200 +Subject: x86/speculation/l1tf: Unbreak !__HAVE_ARCH_PFN_MODIFY_ALLOWED architectures + +From: Jiri Kosina + +commit 6c26fcd2abfe0a56bbd95271fce02df2896cfd24 upstream. + +pfn_modify_allowed() and arch_has_pfn_modify_check() are outside of the +!__ASSEMBLY__ section in include/asm-generic/pgtable.h, which confuses +assembler on archs that don't have __HAVE_ARCH_PFN_MODIFY_ALLOWED (e.g. +ia64) and breaks build: + + include/asm-generic/pgtable.h: Assembler messages: + include/asm-generic/pgtable.h:538: Error: Unknown opcode `static inline bool pfn_modify_allowed(unsigned long pfn,pgprot_t prot)' + include/asm-generic/pgtable.h:540: Error: Unknown opcode `return true' + include/asm-generic/pgtable.h:543: Error: Unknown opcode `static inline bool arch_has_pfn_modify_check(void)' + include/asm-generic/pgtable.h:545: Error: Unknown opcode `return false' + arch/ia64/kernel/entry.S:69: Error: `mov' does not fit into bundle + +Move those two static inlines into the !__ASSEMBLY__ section so that they +don't confuse the asm build pass. + +Fixes: 42e4089c7890 ("x86/speculation/l1tf: Disallow non privileged high MMIO PROT_NONE mappings") +Signed-off-by: Jiri Kosina +Signed-off-by: Thomas Gleixner +Signed-off-by: Greg Kroah-Hartman +[groeck: Context changes] +Signed-off-by: Guenter Roeck + +--- + include/asm-generic/pgtable.h | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +--- a/include/asm-generic/pgtable.h ++++ b/include/asm-generic/pgtable.h +@@ -799,12 +799,6 @@ static inline int pmd_free_pte_page(pmd_ + } + #endif /* CONFIG_HAVE_ARCH_HUGE_VMAP */ + +-#endif /* !__ASSEMBLY__ */ +- +-#ifndef io_remap_pfn_range +-#define io_remap_pfn_range remap_pfn_range +-#endif +- + #ifndef __HAVE_ARCH_PFN_MODIFY_ALLOWED + static inline bool pfn_modify_allowed(unsigned long pfn, pgprot_t prot) + { +@@ -815,6 +809,12 @@ static inline bool arch_has_pfn_modify_c + { + return false; + } ++#endif /* !_HAVE_ARCH_PFN_MODIFY_ALLOWED */ ++ ++#endif /* !__ASSEMBLY__ */ ++ ++#ifndef io_remap_pfn_range ++#define io_remap_pfn_range remap_pfn_range + #endif + + #endif /* _ASM_GENERIC_PGTABLE_H */