public inbox for linux-next@vger.kernel.org 
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb•auug.org.au>
To: Andrey Ryabinin <aryabinin@virtuozzo•com>
Cc: linux-kernel@vger•kernel.org, Ingo Molnar <mingo@kernel•org>,
	Thomas Gleixner <tglx@linutronix•de>,
	"H. Peter Anvin" <hpa@zytor•com>,
	x86@kernel•org, Andrew Morton <akpm@linux-foundation•org>,
	Andy Lutomirski <luto@amacapital•net>,
	Andrey Konovalov <andreyknvl@google•com>,
	Kostya Serebryany <kcc@google•com>,
	Alexander Potapenko <glider@google•com>,
	kasan-dev <kasan-dev@googlegroups•com>,
	Borislav Petkov <bp@alien8•de>,
	Denys Vlasenko <dvlasenk@redhat•com>,
	Andi Kleen <ak@linux•intel.com>,
	Dmitry Vyukov <dvyukov@google•com>,
	Sasha Levin <sasha.levin@oracle•com>,
	Wolfram Gloger <wmglo@dent•med.uni-muenchen.de>,
	linux-next@vger•kernel.org
Subject: linux-next: build problems (Was: [PATCH v3 1/2] Provide READ_ONCE_NOCHECK())
Date: Thu, 15 Oct 2015 20:18:34 +1100	[thread overview]
Message-ID: <20151015201834.350258bf@canb.auug.org.au> (raw)
In-Reply-To: <1444750088-24444-2-git-send-email-aryabinin@virtuozzo.com>

Hi Andrey,

On Tue, 13 Oct 2015 18:28:07 +0300 Andrey Ryabinin <aryabinin@virtuozzo•com> 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 <aryabinin@virtuozzo•com>
> ---
>  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

       reply	other threads:[~2015-10-15  9:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1444739750-29241-1-git-send-email-aryabinin@virtuozzo.com>
     [not found] ` <1444750088-24444-1-git-send-email-aryabinin@virtuozzo.com>
     [not found]   ` <1444750088-24444-2-git-send-email-aryabinin@virtuozzo.com>
2015-10-15  9:18     ` Stephen Rothwell [this message]
2015-10-15 10:03       ` linux-next: build problems (Was: [PATCH v3 1/2] Provide READ_ONCE_NOCHECK()) Andrey Ryabinin
2015-10-15 10:19       ` [PATCH] compiler, READ_ONCE: Fix build failure with some older GCC Andrey Ryabinin
2015-10-15 11:30         ` Ingo Molnar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20151015201834.350258bf@canb.auug.org.au \
    --to=sfr@canb$(echo .)auug.org.au \
    --cc=ak@linux$(echo .)intel.com \
    --cc=akpm@linux-foundation$(echo .)org \
    --cc=andreyknvl@google$(echo .)com \
    --cc=aryabinin@virtuozzo$(echo .)com \
    --cc=bp@alien8$(echo .)de \
    --cc=dvlasenk@redhat$(echo .)com \
    --cc=dvyukov@google$(echo .)com \
    --cc=glider@google$(echo .)com \
    --cc=hpa@zytor$(echo .)com \
    --cc=kasan-dev@googlegroups$(echo .)com \
    --cc=kcc@google$(echo .)com \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linux-next@vger$(echo .)kernel.org \
    --cc=luto@amacapital$(echo .)net \
    --cc=mingo@kernel$(echo .)org \
    --cc=sasha.levin@oracle$(echo .)com \
    --cc=tglx@linutronix$(echo .)de \
    --cc=wmglo@dent$(echo .)med.uni-muenchen.de \
    --cc=x86@kernel$(echo .)org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox