]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.9-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 15 Aug 2018 05:53:52 +0000 (07:53 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 15 Aug 2018 05:53:52 +0000 (07:53 +0200)
added patches:
x86-speculation-l1tf-unbreak-__have_arch_pfn_modify_allowed-architectures.patch

queue-4.9/series
queue-4.9/x86-speculation-l1tf-unbreak-__have_arch_pfn_modify_allowed-architectures.patch [new file with mode: 0644]

index 4181ed3d392481eba82b74e1a9ed43cbbe4afddc..499079ad2de5389df22dad7105709d9bf3b97124 100644 (file)
@@ -108,3 +108,4 @@ x86-microcode-allow-late-microcode-loading-with-smt-disabled.patch
 x86-smp-fix-non-smp-broken-build-due-to-redefinition-of-apic_id_is_primary_thread.patch
 cpu-hotplug-non-smp-machines-do-not-make-use-of-booted_once.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.9/x86-speculation-l1tf-unbreak-__have_arch_pfn_modify_allowed-architectures.patch b/queue-4.9/x86-speculation-l1tf-unbreak-__have_arch_pfn_modify_allowed-architectures.patch
new file mode 100644 (file)
index 0000000..9d5fdaf
--- /dev/null
@@ -0,0 +1,73 @@
+From 6c26fcd2abfe0a56bbd95271fce02df2896cfd24 Mon Sep 17 00:00:00 2001
+From: Jiri Kosina <jkosina@suse.cz>
+Date: Sat, 14 Jul 2018 21:56:13 +0200
+Subject: x86/speculation/l1tf: Unbreak !__HAVE_ARCH_PFN_MODIFY_ALLOWED architectures
+
+From: Jiri Kosina <jkosina@suse.cz>
+
+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 <jkosina@suse.cz>
+Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
+[groeck: Context changes]
+Signed-off-by: Guenter Roeck <linux@roeck-us.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ include/asm-generic/pgtable.h |   25 +++++++++++++------------
+ 1 file changed, 13 insertions(+), 12 deletions(-)
+
+--- a/include/asm-generic/pgtable.h
++++ b/include/asm-generic/pgtable.h
+@@ -828,6 +828,19 @@ static inline int pmd_free_pte_page(pmd_
+ struct file;
+ int phys_mem_access_prot_allowed(struct file *file, unsigned long pfn,
+                       unsigned long size, pgprot_t *vma_prot);
++
++#ifndef __HAVE_ARCH_PFN_MODIFY_ALLOWED
++static inline bool pfn_modify_allowed(unsigned long pfn, pgprot_t prot)
++{
++      return true;
++}
++
++static inline bool arch_has_pfn_modify_check(void)
++{
++      return false;
++}
++#endif /* !_HAVE_ARCH_PFN_MODIFY_ALLOWED */
++
+ #endif /* !__ASSEMBLY__ */
+ #ifndef io_remap_pfn_range
+@@ -842,16 +855,4 @@ int phys_mem_access_prot_allowed(struct
+ #endif
+ #endif
+-#ifndef __HAVE_ARCH_PFN_MODIFY_ALLOWED
+-static inline bool pfn_modify_allowed(unsigned long pfn, pgprot_t prot)
+-{
+-      return true;
+-}
+-
+-static inline bool arch_has_pfn_modify_check(void)
+-{
+-      return false;
+-}
+-#endif
+-
+ #endif /* _ASM_GENERIC_PGTABLE_H */