[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-00d5551cc4eec0fc39c3871c25c613553acfb866@git.kernel.org>
Date: Wed, 25 Jul 2018 07:34:03 -0700
From: tip-bot for Mark Rutland <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: boqun.feng@...il.com, tglx@...utronix.de,
linux-kernel@...r.kernel.org, torvalds@...ux-foundation.org,
mark.rutland@....com, will.deacon@....com, peterz@...radead.org,
mingo@...nel.org, dvyukov@...gle.com, hpa@...or.com
Subject: [tip:locking/core] locking/atomics/x86: Reduce arch_cmpxchg64*()
instrumentation
Commit-ID: 00d5551cc4eec0fc39c3871c25c613553acfb866
Gitweb: https://git.kernel.org/tip/00d5551cc4eec0fc39c3871c25c613553acfb866
Author: Mark Rutland <mark.rutland@....com>
AuthorDate: Mon, 16 Jul 2018 12:30:07 +0100
Committer: Ingo Molnar <mingo@...nel.org>
CommitDate: Wed, 25 Jul 2018 11:53:58 +0200
locking/atomics/x86: Reduce arch_cmpxchg64*() instrumentation
Currently x86's arch_cmpxchg64() and arch_cmpxchg64_local() are
instrumented twice, as they call into instrumented atomics rather than
their arch_ equivalents.
A call to cmpxchg64() results in:
cmpxchg64()
kasan_check_write()
arch_cmpxchg64()
cmpxchg()
kasan_check_write()
arch_cmpxchg()
Let's fix this up and call the arch_ equivalents, resulting in:
cmpxchg64()
kasan_check_write()
arch_cmpxchg64()
arch_cmpxchg()
Signed-off-by: Mark Rutland <mark.rutland@....com>
Acked-by: Thomas Gleixner <tglx@...utronix.de>
Acked-by: Peter Zijlstra (Intel) <peterz@...radead.org>
Acked-by: Will Deacon <will.deacon@....com>
Cc: Boqun Feng <boqun.feng@...il.com>
Cc: Dmitry Vyukov <dvyukov@...gle.com>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: andy.shevchenko@...il.com
Cc: arnd@...db.de
Cc: aryabinin@...tuozzo.com
Cc: catalin.marinas@....com
Cc: glider@...gle.com
Cc: linux-arm-kernel@...ts.infradead.org
Cc: parri.andrea@...il.com
Cc: peter@...leysoftware.com
Link: http://lkml.kernel.org/r/20180716113017.3909-3-mark.rutland@arm.com
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
arch/x86/include/asm/cmpxchg_64.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/include/asm/cmpxchg_64.h b/arch/x86/include/asm/cmpxchg_64.h
index bfca3b346c74..072e5459fe2f 100644
--- a/arch/x86/include/asm/cmpxchg_64.h
+++ b/arch/x86/include/asm/cmpxchg_64.h
@@ -10,13 +10,13 @@ static inline void set_64bit(volatile u64 *ptr, u64 val)
#define arch_cmpxchg64(ptr, o, n) \
({ \
BUILD_BUG_ON(sizeof(*(ptr)) != 8); \
- cmpxchg((ptr), (o), (n)); \
+ arch_cmpxchg((ptr), (o), (n)); \
})
#define arch_cmpxchg64_local(ptr, o, n) \
({ \
BUILD_BUG_ON(sizeof(*(ptr)) != 8); \
- cmpxchg_local((ptr), (o), (n)); \
+ arch_cmpxchg_local((ptr), (o), (n)); \
})
#define system_has_cmpxchg_double() boot_cpu_has(X86_FEATURE_CX16)
Powered by blists - more mailing lists