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]
Date:	Mon, 31 Mar 2014 14:54:19 -0700
From:	Linus Torvalds <torvalds@...ux-foundation.org>
To:	"H. Peter Anvin" <hpa@...ux.intel.com>
Cc:	Andi Kleen <ak@...ux.intel.com>, Gleb Natapov <gleb@...hat.com>,
	Peter Anvin <hpa@...or.com>, hubicka@....cz,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Ingo Molnar <mingo@...nel.org>,
	Paolo Bonzini <pbonzini@...hat.com>,
	Jaroslav Kysela <perex@...ex.cz>,
	Peter Zijlstra <peterz@...radead.org>,
	Steven Rostedt <rostedt@...dmis.org>,
	Rusty Russell <rusty@...tcorp.com.au>,
	Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [GIT PULL] x86 LTO changes for v3.15

On Mon, Mar 31, 2014 at 2:05 PM, H. Peter Anvin <hpa@...ux.intel.com> wrote:
> diff --git a/include/linux/linkage.h b/include/linux/linkage.h
> index a6a42dd..34a513a 100644
> --- a/include/linux/linkage.h
> +++ b/include/linux/linkage.h
> @@ -12,9 +12,9 @@
>  #endif
>
>  #ifdef __cplusplus
> -#define CPP_ASMLINKAGE extern "C"
> +#define CPP_ASMLINKAGE extern "C" __visible
>  #else
> -#define CPP_ASMLINKAGE
> +#define CPP_ASMLINKAGE __visible
>  #endif

This seems to result in new warnings, and they appear to be valid.

We have things like

  arch/x86/crypto/sha1_ssse3_glue.c:43:1: warning:
‘externally_visible’ attribute have effect only on public objects
[-Wattributes]
   static asmlinkage void (*sha1_transform_asm)(u32 *, const char *,
unsigned int);
   ^

and it seems to be because "asmlinkage" now means "visible", which is
utter BS. "asmlinkage" is about the calling convention, and visibility
is about something completely different.

So the compiler is actually correct in warning about insane code.
You're basically saying "static" + "visible", which makes no sense.
But "static" + "asmlinkage void (*)" makes sense, because it's about
the "void (*)" being a function with asmlinkage calling convention.

So I think that adding "visible" to asmlinkage is actively wrong and
misguided. And the compiler even told you so, but somebody then chose
to ignore the compiler telling them that they did stupid things.

Don't do crap like this.

                   Linus
--
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