lkml.org 
[lkml]   [2015]   [Oct]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject[PATCH v2 0/2] Silence KASAN warnings in get_wchan()
Date

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



\
 
 \ /
  Last update: 2015-10-13 15:01    [W:1.353 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site