[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1444739750-29241-1-git-send-email-aryabinin@virtuozzo.com>
Date: Tue, 13 Oct 2015 15:35:48 +0300
From: Andrey Ryabinin <aryabinin@...tuozzo.com>
To: <linux-kernel@...r.kernel.org>
CC: Andrey Ryabinin <aryabinin@...tuozzo.com>,
Ingo Molnar <mingo@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>,
"H. Peter Anvin" <hpa@...or.com>, <x86@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Andy Lutomirski <luto@...capital.net>,
Andrey Konovalov <andreyknvl@...gle.com>,
Kostya Serebryany <kcc@...gle.com>,
Alexander Potapenko <glider@...gle.com>,
kasan-dev <kasan-dev@...glegroups.com>,
Borislav Petkov <bp@...en8.de>,
Denys Vlasenko <dvlasenk@...hat.com>,
Andi Kleen <ak@...ux.intel.com>,
Dmitry Vyukov <dvyukov@...gle.com>,
Sasha Levin <sasha.levin@...cle.com>,
Wolfram Gloger <wmglo@...t.med.uni-muenchen.de>
Subject: [PATCH v2 0/2] Silence KASAN warnings in get_wchan()
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists