* [PATCH] x86/speculation/l1tf: Add assembly guard for xtensa/ia64
@ 2018-08-15 21:56 Andi Kleen
2018-08-15 22:36 ` Guenter Roeck
0 siblings, 1 reply; 2+ messages in thread
From: Andi Kleen @ 2018-08-15 21:56 UTC (permalink / raw)
To: stable; +Cc: linux-kernel, Andi Kleen
From: Andi Kleen <ak@linux.intel.com>
The stable backport of the
x86/speculation/l1tf: Disallow non privileged high MMIO PROT_NONE mappings
patch for 4.4 and 4.9 put new C code for !__HAVE_ARCH_PFN_MODIFY_ALLOWED
code outside the assembler ifdef. This breaks the xtensa and ia64
build as reported by 0day which somehow include this file
into assembler.
Just add an #ifdef __ASSEMBLY__ around the new code to fix this.
This patch is only needed for 4.9 and 4.4 stable, the newer stables
don't have this problem.
Fixes: 7c5b42f82c13 ("x86/speculation/l1tf: Disallow non privileged high MMIO PROT_NONE mappings")
Signed-off-by: Andi Kleen <ak@linux.intel.com>
---
include/asm-generic/pgtable.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/include/asm-generic/pgtable.h b/include/asm-generic/pgtable.h
index a88ea9e37a25..abc2a1b15dd8 100644
--- a/include/asm-generic/pgtable.h
+++ b/include/asm-generic/pgtable.h
@@ -825,6 +825,7 @@ static inline int pmd_free_pte_page(pmd_t *pmd)
#endif
#endif
+#ifndef __ASSEMBLY__
struct file;
int phys_mem_access_prot_allowed(struct file *file, unsigned long pfn,
unsigned long size, pgprot_t *vma_prot);
@@ -839,6 +840,9 @@ static inline bool arch_has_pfn_modify_check(void)
{
return false;
}
+
+#endif
+
#endif /* !_HAVE_ARCH_PFN_MODIFY_ALLOWED */
#endif /* !__ASSEMBLY__ */
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] x86/speculation/l1tf: Add assembly guard for xtensa/ia64
2018-08-15 21:56 [PATCH] x86/speculation/l1tf: Add assembly guard for xtensa/ia64 Andi Kleen
@ 2018-08-15 22:36 ` Guenter Roeck
0 siblings, 0 replies; 2+ messages in thread
From: Guenter Roeck @ 2018-08-15 22:36 UTC (permalink / raw)
To: Andi Kleen; +Cc: stable, linux-kernel, Andi Kleen
On Wed, Aug 15, 2018 at 02:56:46PM -0700, Andi Kleen wrote:
> From: Andi Kleen <ak@linux.intel.com>
>
> The stable backport of the
>
> x86/speculation/l1tf: Disallow non privileged high MMIO PROT_NONE mappings
>
> patch for 4.4 and 4.9 put new C code for !__HAVE_ARCH_PFN_MODIFY_ALLOWED
> code outside the assembler ifdef. This breaks the xtensa and ia64
> build as reported by 0day which somehow include this file
> into assembler.
>
> Just add an #ifdef __ASSEMBLY__ around the new code to fix this.
>
> This patch is only needed for 4.9 and 4.4 stable, the newer stables
> don't have this problem.
>
> Fixes: 7c5b42f82c13 ("x86/speculation/l1tf: Disallow non privileged high MMIO PROT_NONE mappings")
> Signed-off-by: Andi Kleen <ak@linux.intel.com>
This should be fixed in the final stable releases.
The problem was caused by a couple of missing backports.
Guenter
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-08-15 22:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-15 21:56 [PATCH] x86/speculation/l1tf: Add assembly guard for xtensa/ia64 Andi Kleen
2018-08-15 22:36 ` Guenter Roeck
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).