lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20151015113058.GA19412@gmail.com>
Date:	Thu, 15 Oct 2015 13:30:58 +0200
From:	Ingo Molnar <mingo@...nel.org>
To:	Andrey Ryabinin <aryabinin@...tuozzo.com>
Cc:	linux-kernel@...r.kernel.org,
	Stephen Rothwell <sfr@...b.auug.org.au>,
	linux-next@...r.kernel.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: Re: [PATCH] compiler, READ_ONCE: Fix build failure with some older
 GCC


* Andrey Ryabinin <aryabinin@...tuozzo.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@...b.auug.org.au>
> Signed-off-by: Andrey Ryabinin <aryabinin@...tuozzo.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
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ