From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752400AbbJOJTF (ORCPT ); Thu, 15 Oct 2015 05:19:05 -0400 Received: from ozlabs.org ([103.22.144.67]:60054 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751222AbbJOJSh convert rfc822-to-8bit (ORCPT ); Thu, 15 Oct 2015 05:18:37 -0400 Date: Thu, 15 Oct 2015 20:18:34 +1100 From: Stephen Rothwell To: Andrey Ryabinin Cc: , Ingo Molnar , Thomas Gleixner , "H. Peter Anvin" , , Andrew Morton , Andy Lutomirski , Andrey Konovalov , Kostya Serebryany , Alexander Potapenko , kasan-dev , Borislav Petkov , Denys Vlasenko , Andi Kleen , Dmitry Vyukov , Sasha Levin , Wolfram Gloger , Subject: linux-next: build problems (Was: [PATCH v3 1/2] Provide READ_ONCE_NOCHECK()) Message-ID: <20151015201834.350258bf@canb.auug.org.au> In-Reply-To: <1444750088-24444-2-git-send-email-aryabinin@virtuozzo.com> References: <1444739750-29241-1-git-send-email-aryabinin@virtuozzo.com> <1444750088-24444-1-git-send-email-aryabinin@virtuozzo.com> <1444750088-24444-2-git-send-email-aryabinin@virtuozzo.com> X-Mailer: Claws Mail 3.13.0 (GTK+ 2.24.28; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Andrey, On Tue, 13 Oct 2015 18:28:07 +0300 Andrey Ryabinin wrote: > > Some code may perform racy by design memory reads. This could be harmless, > yet such code may produce KASAN warnings. > > To hide such accesses from KASAN this patch introduces READ_ONCE_NOCHECK() > macro. KASAN will not check the memory accessed by READ_ONCE_NOCHECK(). > > This patch creates __read_once_size_nocheck() a clone of > __read_once_size_check() (renamed __read_once_size()). > The only difference between them is 'no_sanitized_address' attribute > appended to '*_nocheck' function. This attribute tells the compiler that > instrumentation of memory accesses should not be applied to that function. > We declare it as static '__maybe_unsed' because GCC is not capable to > inline such function: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67368 > > With KASAN=n READ_ONCE_NOCHECK() is just a clone of READ_ONCE(). > > Signed-off-by: Andrey Ryabinin > --- > include/linux/compiler-gcc.h | 13 ++++++++++ > include/linux/compiler.h | 60 ++++++++++++++++++++++++++++++++++---------- > 2 files changed, 60 insertions(+), 13 deletions(-) I am pretty sure that this patch is causing quite a bit of compile breakage in linux-next today. During the day I compile with gcc 4.9.0 and did not see any problems with c86_64 allmodconfig, or i386 defconfig etc, but overnight we compile with older compilers (gcc 4.6.3 in particular) and are getting quite a few errors: >>From an i386 allnoconfig build: arch/x86/entry/vdso/vdso32.so.dbg: undefined symbols found /home/kisskb/slave/src/arch/x86/entry/vdso/Makefile:154: recipe for target 'arch/x86/entry/vdso/vdso32.so.dbg' failed >>From an x86_64 allnoconfig build: arch/x86/entry/vdso/vclock_gettime.o: In function `__read_once_size_check': vclock_gettime.c:(.text+0x5f): undefined reference to `memcpy' arch/x86/entry/vdso/vgetcpu.o: In function `__read_once_size_check': vgetcpu.c:(.text+0x2f): undefined reference to `memcpy' and several others ... -- Cheers, Stephen Rothwell sfr@canb.auug.org.au