From: Ingo Molnar <mingo@kernel.org>
To: Andrey Ryabinin <aryabinin@virtuozzo.com>
Cc: linux-kernel@vger.kernel.org,
Stephen Rothwell <sfr@canb.auug.org.au>,
linux-next@vger.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>
Subject: Re: [PATCH] compiler, READ_ONCE: Fix build failure with some older GCC
Date: Thu, 15 Oct 2015 13:30:58 +0200 [thread overview]
Message-ID: <20151015113058.GA19412@gmail.com> (raw)
In-Reply-To: <1444904391-18058-1-git-send-email-aryabinin@virtuozzo.com>
* Andrey Ryabinin <aryabinin@virtuozzo.com> wrote:
> Some old versions of GCC doesn't handle __alias (or maybe a combination
> of 'static __always_inline __alias') right.
>
> GCC creates outline and unused copy of __read_once_size_check()
> function in the object file which references memcpy and causes
> the build failure:
> 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'
>
> We could avoid using alias to work around this problem.
>
> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
> Signed-off-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
> ---
> include/linux/compiler.h | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/include/linux/compiler.h b/include/linux/compiler.h
> index aa2ae4c..3436a4c 100644
> --- a/include/linux/compiler.h
> +++ b/include/linux/compiler.h
> @@ -231,8 +231,11 @@ void __read_once_size_nocheck(const volatile void *p, void *res, int size)
> __READ_ONCE_SIZE;
> }
> #else
> -static __always_inline __alias(__read_once_size_check)
> -void __read_once_size_nocheck(const volatile void *p, void *res, int size);
> +static __always_inline
> +void __read_once_size_nocheck(const volatile void *p, void *res, int size)
> +{
> + __READ_ONCE_SIZE;
> +}
> #endif
Yeah, so could you please re-send the original two patches, with all the changes
(typo fixes, renaming, this build fix, etc.) propagated that were found in testing
and that were suggested in the review thread?
I'll remove the broken commits from linux-next meanwhile.
Thanks,
Ingo
prev parent reply other threads:[~2015-10-15 11:30 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 ` linux-next: build problems (Was: [PATCH v3 1/2] Provide READ_ONCE_NOCHECK()) Stephen Rothwell
2015-10-15 10:03 ` 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 [this message]
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=20151015113058.GA19412@gmail.com \
--to=mingo@kernel.org \
--cc=ak@linux.intel.com \
--cc=akpm@linux-foundation.org \
--cc=andreyknvl@google.com \
--cc=aryabinin@virtuozzo.com \
--cc=bp@alien8.de \
--cc=dvlasenk@redhat.com \
--cc=dvyukov@google.com \
--cc=glider@google.com \
--cc=hpa@zytor.com \
--cc=kasan-dev@googlegroups.com \
--cc=kcc@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=luto@amacapital.net \
--cc=sasha.levin@oracle.com \
--cc=sfr@canb.auug.org.au \
--cc=tglx@linutronix.de \
--cc=wmglo@dent.med.uni-muenchen.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).