]> git.proxmox.com Git - pve-kernel.git/blame - patches/kernel/0239-x86-alternatives-Add-missing-n-at-end-of-ALTERNATIVE.patch
build: reformat existing patches
[pve-kernel.git] / patches / kernel / 0239-x86-alternatives-Add-missing-n-at-end-of-ALTERNATIVE.patch
CommitLineData
59d5af67 1From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
e4cdf2a5
FG
2From: David Woodhouse <dwmw@amazon.co.uk>
3Date: Thu, 4 Jan 2018 14:37:05 +0000
59d5af67
FG
4Subject: [PATCH] x86/alternatives: Add missing '\n' at end of ALTERNATIVE
5 inline asm
e4cdf2a5
FG
6MIME-Version: 1.0
7Content-Type: text/plain; charset=UTF-8
8Content-Transfer-Encoding: 8bit
9
10commit b9e705ef7cfaf22db0daab91ad3cd33b0fa32eb9 upstream.
11
12Where an ALTERNATIVE is used in the middle of an inline asm block, this
13would otherwise lead to the following instruction being appended directly
14to the trailing ".popsection", and a failed compile.
15
16Fixes: 9cebed423c84 ("x86, alternative: Use .pushsection/.popsection")
17Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
18Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
19Cc: gnomes@lxorguk.ukuu.org.uk
20Cc: Rik van Riel <riel@redhat.com>
21Cc: ak@linux.intel.com
22Cc: Tim Chen <tim.c.chen@linux.intel.com>
23Cc: Peter Zijlstra <peterz@infradead.org>
24Cc: Paul Turner <pjt@google.com>
25Cc: Jiri Kosina <jikos@kernel.org>
26Cc: Andy Lutomirski <luto@amacapital.net>
27Cc: Dave Hansen <dave.hansen@intel.com>
28Cc: Kees Cook <keescook@google.com>
29Cc: Linus Torvalds <torvalds@linux-foundation.org>
30Cc: Greg Kroah-Hartman <gregkh@linux-foundation.org>
31Link: https://lkml.kernel.org/r/20180104143710.8961-8-dwmw@amazon.co.uk
32Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
33Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
34---
35 arch/x86/include/asm/alternative.h | 4 ++--
36 1 file changed, 2 insertions(+), 2 deletions(-)
37
38diff --git a/arch/x86/include/asm/alternative.h b/arch/x86/include/asm/alternative.h
39index d4aea31eec03..deca9b9c7923 100644
40--- a/arch/x86/include/asm/alternative.h
41+++ b/arch/x86/include/asm/alternative.h
42@@ -139,7 +139,7 @@ static inline int alternatives_text_reserved(void *start, void *end)
43 ".popsection\n" \
44 ".pushsection .altinstr_replacement, \"ax\"\n" \
45 ALTINSTR_REPLACEMENT(newinstr, feature, 1) \
46- ".popsection"
47+ ".popsection\n"
48
49 #define ALTERNATIVE_2(oldinstr, newinstr1, feature1, newinstr2, feature2)\
50 OLDINSTR_2(oldinstr, 1, 2) \
51@@ -150,7 +150,7 @@ static inline int alternatives_text_reserved(void *start, void *end)
52 ".pushsection .altinstr_replacement, \"ax\"\n" \
53 ALTINSTR_REPLACEMENT(newinstr1, feature1, 1) \
54 ALTINSTR_REPLACEMENT(newinstr2, feature2, 2) \
55- ".popsection"
56+ ".popsection\n"
57
58 /*
59 * Alternative instructions for different CPU types or capabilities.
60--
612.14.2
62