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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 31 Mar 2014 17:17:03 -0700
From:	Linus Torvalds <torvalds@...ux-foundation.org>
To:	Andi Kleen <ak@...ux.intel.com>
Cc:	"H. Peter Anvin" <hpa@...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 4:03 PM, Andi Kleen <ak@...ux.intel.com> wrote:
>
> However with LTO pretty much all asmlinkages have to become
> visible, as they are used by assembler code and we need to
> tell that to the compiler, otherwise it'll optimize it away.
>
> So I abused asmlinkage for this.

I see why you did it, but I suspect it's not really necessary.

As far as I can tell, *most* of our current asmlinkage use is for the
system call declarations (both compat and regular), and the actual
*definition* of those system calls should pretty much universally use
the SYSCALL_DEFINEx() and COMPAT_SYSCALL_DEFINEx() macros.

So what I would propose is:

 - don't do the __visible as part of asmlinkage, because it really is
conceptually wrong

 - add the visible to the SYSCALL_DEFINEx() macros

and after that I strongly suspect that there will be only a handful of
cases left that are called from assembly language and that aren't
system calls. Things like "printk()" and friends that are really
special. They'd need a few manual "__visible" annotations.

> If you prefer to do it explicitely  I can send
> patches (it would be a very mechanic, long and boring
> tree sweep ...).

See above: I can pretty much guarantee that you should *not* need do
any crazy automated sweeps.  Because you shouldn't need "__visible" at
the declarations in the header files, only at the definition of the
function, right? So SYSCALL_DEFINEx() really should catch all the
normal cases.

                       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