From: Andy Lutomirski Date: Tue, 26 Apr 2016 19:23:25 +0000 (-0700) Subject: x86/asm: Make asm/alternative.h safe from assembly X-Git-Tag: v4.1.12-124.31.3~1193 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=ba364f4cd2461181b0b3fbd1ef72dee55b1dff51;p=users%2Fjedix%2Flinux-maple.git x86/asm: Make asm/alternative.h safe from assembly commit f005f5d860e0231fe212cfda8c1a3148b99609f4 upstream. asm/alternative.h isn't directly useful from assembly, but it shouldn't break the build. Signed-off-by: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/e5b693fcef99fe6e80341c9e97a002fb23871e91.1461698311.git.luto@kernel.org Signed-off-by: Ingo Molnar Signed-off-by: Razvan Ghitulete Signed-off-by: Greg Kroah-Hartman Orabug: 27477743 CVE: CVE-2017-5715 (cherry picked from commit b8e7a489b51810992ba3266bfd9e043709e07267) Signed-off-by: Daniel Jordan Signed-off-by: Konrad Rzeszutek Wilk Reviewed-by: Mike Kravetz Reviewed-by: Pavel Tatashin --- diff --git a/arch/x86/include/asm/alternative.h b/arch/x86/include/asm/alternative.h index 5ed0d04177b8..22efe7b6db51 100644 --- a/arch/x86/include/asm/alternative.h +++ b/arch/x86/include/asm/alternative.h @@ -1,6 +1,8 @@ #ifndef _ASM_X86_ALTERNATIVE_H #define _ASM_X86_ALTERNATIVE_H +#ifndef __ASSEMBLY__ + #include #include #include @@ -266,4 +268,6 @@ extern void *text_poke(void *addr, const void *opcode, size_t len); extern int poke_int3_handler(struct pt_regs *regs); extern void *text_poke_bp(void *addr, const void *opcode, size_t len, void *handler); +#endif /* __ASSEMBLY__ */ + #endif /* _ASM_X86_ALTERNATIVE_H */