| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149 |
- From 7d7ea8398b5f0cf22b8faec46c95543031c5fe94 Mon Sep 17 00:00:00 2001
- From: Uros Bizjak <[email protected]>
- Date: Wed, 6 Sep 2017 17:18:08 +0200
- Subject: [PATCH 051/242] x86/asm: Remove unnecessary \n\t in front of CC_SET()
- from asm templates
- MIME-Version: 1.0
- Content-Type: text/plain; charset=UTF-8
- Content-Transfer-Encoding: 8bit
- CVE-2017-5754
- There is no need for \n\t in front of CC_SET(), as the macro already includes these two.
- Signed-off-by: Uros Bizjak <[email protected]>
- Cc: Linus Torvalds <[email protected]>
- Cc: Peter Zijlstra <[email protected]>
- Cc: Thomas Gleixner <[email protected]>
- Link: http://lkml.kernel.org/r/[email protected]
- Signed-off-by: Ingo Molnar <[email protected]>
- (backported from commit 3c52b5c64326d9dcfee4e10611c53ec1b1b20675)
- Signed-off-by: Andy Whitcroft <[email protected]>
- Signed-off-by: Kleber Sacilotto de Souza <[email protected]>
- (cherry picked from commit 1c3f29ec5586e3aecfde2c6f83b8786e1aecd9ac)
- Signed-off-by: Fabian Grünbichler <[email protected]>
- ---
- arch/x86/include/asm/archrandom.h | 8 ++++----
- arch/x86/include/asm/bitops.h | 10 +++++-----
- arch/x86/include/asm/percpu.h | 2 +-
- arch/x86/include/asm/rmwcc.h | 2 +-
- 4 files changed, 11 insertions(+), 11 deletions(-)
- diff --git a/arch/x86/include/asm/archrandom.h b/arch/x86/include/asm/archrandom.h
- index 5b0579abb398..3ac991d81e74 100644
- --- a/arch/x86/include/asm/archrandom.h
- +++ b/arch/x86/include/asm/archrandom.h
- @@ -45,7 +45,7 @@ static inline bool rdrand_long(unsigned long *v)
- bool ok;
- unsigned int retry = RDRAND_RETRY_LOOPS;
- do {
- - asm volatile(RDRAND_LONG "\n\t"
- + asm volatile(RDRAND_LONG
- CC_SET(c)
- : CC_OUT(c) (ok), "=a" (*v));
- if (ok)
- @@ -59,7 +59,7 @@ static inline bool rdrand_int(unsigned int *v)
- bool ok;
- unsigned int retry = RDRAND_RETRY_LOOPS;
- do {
- - asm volatile(RDRAND_INT "\n\t"
- + asm volatile(RDRAND_INT
- CC_SET(c)
- : CC_OUT(c) (ok), "=a" (*v));
- if (ok)
- @@ -71,7 +71,7 @@ static inline bool rdrand_int(unsigned int *v)
- static inline bool rdseed_long(unsigned long *v)
- {
- bool ok;
- - asm volatile(RDSEED_LONG "\n\t"
- + asm volatile(RDSEED_LONG
- CC_SET(c)
- : CC_OUT(c) (ok), "=a" (*v));
- return ok;
- @@ -80,7 +80,7 @@ static inline bool rdseed_long(unsigned long *v)
- static inline bool rdseed_int(unsigned int *v)
- {
- bool ok;
- - asm volatile(RDSEED_INT "\n\t"
- + asm volatile(RDSEED_INT
- CC_SET(c)
- : CC_OUT(c) (ok), "=a" (*v));
- return ok;
- diff --git a/arch/x86/include/asm/bitops.h b/arch/x86/include/asm/bitops.h
- index 854022772c5b..8cee8db6dffb 100644
- --- a/arch/x86/include/asm/bitops.h
- +++ b/arch/x86/include/asm/bitops.h
- @@ -142,7 +142,7 @@ static __always_inline void __clear_bit(long nr, volatile unsigned long *addr)
- static __always_inline bool clear_bit_unlock_is_negative_byte(long nr, volatile unsigned long *addr)
- {
- bool negative;
- - asm volatile(LOCK_PREFIX "andb %2,%1\n\t"
- + asm volatile(LOCK_PREFIX "andb %2,%1"
- CC_SET(s)
- : CC_OUT(s) (negative), ADDR
- : "ir" ((char) ~(1 << nr)) : "memory");
- @@ -245,7 +245,7 @@ static __always_inline bool __test_and_set_bit(long nr, volatile unsigned long *
- {
- bool oldbit;
-
- - asm("bts %2,%1\n\t"
- + asm("bts %2,%1"
- CC_SET(c)
- : CC_OUT(c) (oldbit), ADDR
- : "Ir" (nr));
- @@ -285,7 +285,7 @@ static __always_inline bool __test_and_clear_bit(long nr, volatile unsigned long
- {
- bool oldbit;
-
- - asm volatile("btr %2,%1\n\t"
- + asm volatile("btr %2,%1"
- CC_SET(c)
- : CC_OUT(c) (oldbit), ADDR
- : "Ir" (nr));
- @@ -297,7 +297,7 @@ static __always_inline bool __test_and_change_bit(long nr, volatile unsigned lon
- {
- bool oldbit;
-
- - asm volatile("btc %2,%1\n\t"
- + asm volatile("btc %2,%1"
- CC_SET(c)
- : CC_OUT(c) (oldbit), ADDR
- : "Ir" (nr) : "memory");
- @@ -328,7 +328,7 @@ static __always_inline bool variable_test_bit(long nr, volatile const unsigned l
- {
- bool oldbit;
-
- - asm volatile("bt %2,%1\n\t"
- + asm volatile("bt %2,%1"
- CC_SET(c)
- : CC_OUT(c) (oldbit)
- : "m" (*(unsigned long *)addr), "Ir" (nr));
- diff --git a/arch/x86/include/asm/percpu.h b/arch/x86/include/asm/percpu.h
- index 9fa03604b2b3..b21a475fd7ed 100644
- --- a/arch/x86/include/asm/percpu.h
- +++ b/arch/x86/include/asm/percpu.h
- @@ -525,7 +525,7 @@ static inline bool x86_this_cpu_variable_test_bit(int nr,
- {
- bool oldbit;
-
- - asm volatile("bt "__percpu_arg(2)",%1\n\t"
- + asm volatile("bt "__percpu_arg(2)",%1"
- CC_SET(c)
- : CC_OUT(c) (oldbit)
- : "m" (*(unsigned long __percpu *)addr), "Ir" (nr));
- diff --git a/arch/x86/include/asm/rmwcc.h b/arch/x86/include/asm/rmwcc.h
- index 661dd305694a..dd7ba5aa8dca 100644
- --- a/arch/x86/include/asm/rmwcc.h
- +++ b/arch/x86/include/asm/rmwcc.h
- @@ -28,7 +28,7 @@ cc_label: \
- #define __GEN_RMWcc(fullop, var, cc, ...) \
- do { \
- bool c; \
- - asm volatile (fullop ";" CC_SET(cc) \
- + asm volatile (fullop CC_SET(cc) \
- : "+m" (var), CC_OUT(cc) (c) \
- : __VA_ARGS__ : "memory"); \
- return c; \
- --
- 2.14.2
|