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-next>] [day] [month] [year] [list]
Date:	Mon,  5 Aug 2013 15:02:34 -0700
From:	Andi Kleen <andi@...stfloor.org>
To:	x86@...nel.org
Cc:	linux-kernel@...r.kernel.org
Subject: x86: Clean up asmlinkage use

This patchkit makes the use of asmlinkage consistent in arch/x86
Originally arch/x86 was (mostly) fully annotated with asmlinkage, but 
this has bitrotted over time.

These changes were originally part of my LTO patchkit. In the interest
of making it smaller, I'm posting them separately, as they can be
considered cleanups.

By itself they do not improve anything in the existing kernel,
except for making things more consistent.

They may be useful for other global compile time instrumentation tools
to indicate clearly that some function/variable can be changed
outside their view.

---

The goal is to mark every function or variable that can be called
from assembler. asmlinkage on 32bit includes regparm(0) so changes
semantics. Since I didn't want to audit every caller and make
this patchkit a nop by itself, I did not add new asmlinkage
to 32bit functions that take parameters. So no existing function
switches from regparm(3) to (0).

Instead every function with parameter (and variables) becomes
__visible. This is roughly equivalent now to the old "asmregparm"
(which was removed some time ago), except it also works for 
variables.

So in summary the changes are:
- Mark every function without arguments (or 64bit only) 
that is used by assembler asmlinkage
- Mark every function with parameters or variables 
that is used by assembler __visible.

I also included a few related fixes with inline assembler
and a type fix for the syscall table.

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