Messages in this thread | | | From | Andrey Ryabinin <> | Subject | [PATCH v2 0/2] Silence KASAN warnings in get_wchan() | Date | Tue, 13 Oct 2015 15:35:48 +0300 |
| |
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
| |