All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/2] Silence KASAN warnings in get_wchan()
@ 2015-10-13 12:35 Andrey Ryabinin
  2015-10-13 12:35 ` [PATCH v2 1/2] Provide READ_ONCE_NOCHECK() Andrey Ryabinin
                   ` (4 more replies)
  0 siblings, 5 replies; 62+ messages in thread
From: Andrey Ryabinin @ 2015-10-13 12:35 UTC (permalink / raw)
  To: linux-kernel
  Cc: Andrey Ryabinin, Ingo Molnar, Thomas Gleixner, H. Peter Anvin,
	x86, Andrew Morton, Andy Lutomirski, Andrey Konovalov,
	Kostya Serebryany, Alexander Potapenko, kasan-dev,
	Borislav Petkov, Denys Vlasenko, Andi Kleen, Dmitry Vyukov,
	Sasha Levin, Wolfram Gloger


Originally I suggested to implement READ_ONCE_NOCHECK(), like this:
#define READ_ONCE_NOCHECK(x) \
{(	typeof(x) __val; \
	kasan_disable_local(); \
	__val = READ_ONCE(x); \
	kasan_enable_local(); \
	__val;\
)}

But then I realised that we can't put this into linux/compiler.h
since it requires to add some includes (we need linux/kasan.h which
also requires linux/sched.h). It's not even that simple to put this into kernel.h

So I've come to another approach, see the first patch for details.
Pros:
 - It generates more efficient code rather than variant above
Cons:
 - REAS_ONCE() becomes rather messy.


Andrey Ryabinin (2):
  Provide READ_ONCE_NOCHECK()
  x86/process: Silence KASAN warnings in get_wchan()

 arch/x86/kernel/process.c    |  6 +++---
 include/linux/compiler-gcc.h | 13 ++++++++++++
 include/linux/compiler.h     | 49 ++++++++++++++++++++++++++++++++------------
 3 files changed, 52 insertions(+), 16 deletions(-)

-- 
2.4.9


^ permalink raw reply	[flat|nested] 62+ messages in thread

end of thread, other threads:[~2015-10-20  9:43 UTC | newest]

Thread overview: 62+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-13 12:35 [PATCH v2 0/2] Silence KASAN warnings in get_wchan() Andrey Ryabinin
2015-10-13 12:35 ` [PATCH v2 1/2] Provide READ_ONCE_NOCHECK() Andrey Ryabinin
2015-10-13 14:16   ` Ingo Molnar
2015-10-13 16:02   ` kbuild test robot
2015-10-13 16:31     ` Andrey Ryabinin
2015-10-14 13:40       ` Ingo Molnar
2015-10-14 14:11         ` Andrey Ryabinin
2015-10-13 12:35 ` [PATCH v2 2/2] x86/process: Silence KASAN warnings in get_wchan() Andrey Ryabinin
2015-10-13 13:48   ` Ingo Molnar
2015-10-13 13:57     ` Andrey Ryabinin
2015-10-13 13:57     ` Dmitry Vyukov
2015-10-13 14:15       ` Andrey Ryabinin
2015-10-13 14:19       ` Ingo Molnar
2015-10-13 15:28 ` [PATCH v3 0/2] " Andrey Ryabinin
2015-10-13 15:28   ` [PATCH v3 1/2] Provide READ_ONCE_NOCHECK() Andrey Ryabinin
2015-10-14 15:28     ` [tip:locking/urgent] compiler, atomics: Provide READ_ONCE_NOCHECK () tip-bot for Andrey Ryabinin
2015-10-14 15:45       ` Paul E. McKenney
2015-10-14 15:50         ` Dmitry Vyukov
2015-10-14 16:01           ` Paul E. McKenney
2015-10-14 16:08             ` Dmitry Vyukov
2015-10-14 16:16               ` Peter Zijlstra
2015-10-14 16:18                 ` Dmitry Vyukov
2015-10-14 16:20                   ` Peter Zijlstra
2015-10-14 16:23                     ` Andy Lutomirski
2015-10-14 16:34                       ` Peter Zijlstra
2015-10-14 17:48                         ` Ingo Molnar
2015-10-14 17:57                           ` Andy Lutomirski
2015-10-14 16:34                     ` Dmitry Vyukov
2015-10-14 16:54                       ` Peter Zijlstra
2015-10-14 16:20               ` Paul E. McKenney
2015-10-14 16:32                 ` Dmitry Vyukov
2015-10-14 17:04                   ` Paul E. McKenney
2015-10-14 17:23                     ` Dmitry Vyukov
2015-10-14 17:34                       ` Paul E. McKenney
2015-10-14 16:19           ` Andrey Ryabinin
2015-10-14 16:29             ` Dmitry Vyukov
2015-10-14 17:06               ` Paul E. McKenney
2015-10-15  9:18     ` linux-next: build problems (Was: [PATCH v3 1/2] Provide READ_ONCE_NOCHECK()) Stephen Rothwell
2015-10-15  9:18       ` Stephen Rothwell
2015-10-15 10:03       ` Andrey Ryabinin
2015-10-15 10:03         ` Andrey Ryabinin
2015-10-15 10:19       ` [PATCH] compiler, READ_ONCE: Fix build failure with some older GCC Andrey Ryabinin
2015-10-15 10:19         ` Andrey Ryabinin
2015-10-15 11:30         ` Ingo Molnar
2015-10-13 15:28   ` [PATCH v3 2/2] x86/process: Silence KASAN warnings in get_wchan() Andrey Ryabinin
2015-10-14 15:29     ` [tip:locking/urgent] x86/mm: Silence KASAN warnings in get_wchan( ) tip-bot for Andrey Ryabinin
2015-10-16  9:44 ` [PATCH v4 0/2] Andrey Ryabinin
2015-10-16  9:44   ` [PATCH v4 1/2] compiler, atomics: Provide READ_ONCE_NOKSAN() Andrey Ryabinin
2015-10-16 10:00     ` Peter Zijlstra
2015-10-16 10:54       ` Andrey Ryabinin
2015-10-16 11:08         ` Peter Zijlstra
2015-10-16 10:33     ` Borislav Petkov
2015-10-16 11:58       ` Andrey Ryabinin
2015-10-18  7:24         ` Ingo Molnar
2015-10-16 16:05       ` Paul E. McKenney
2015-10-16  9:44   ` [PATCH v4 2/2] x86/mm: Silence KASAN warnings in get_wchan() Andrey Ryabinin
2015-10-16  9:47   ` [PATCH v4 0/2] " Andrey Ryabinin
2015-10-19  8:37 ` [PATCH v5 " Andrey Ryabinin
2015-10-19  8:37   ` [PATCH v5 1/2] compiler, atomics: Provide READ_ONCE_NOCHECK() Andrey Ryabinin
2015-10-20  9:37     ` [tip:x86/urgent] compiler, atomics, kasan: " tip-bot for Andrey Ryabinin
2015-10-19  8:37   ` [PATCH v5 2/2] x86/mm: Silence KASAN warnings in get_wchan() Andrey Ryabinin
2015-10-20  9:37     ` [tip:x86/urgent] x86/mm, kasan: " tip-bot for Andrey Ryabinin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.