]> Git Repo - linux.git/commit
x86/asm/entry/32: Simplify the zeroing of pt_regs->r8..r11 in the int80 code path
authorDenys Vlasenko <[email protected]>
Tue, 2 Jun 2015 17:35:10 +0000 (19:35 +0200)
committerIngo Molnar <[email protected]>
Fri, 5 Jun 2015 11:22:21 +0000 (13:22 +0200)
commit61b1e3e782d6784b714c0d80de529e0737d0e79c
tree09c069fe2b31d6c49f5ebb152f6a512ba93a31fe
parent5ca6f70f387b4f82903037cc3c5488e2c97dcdbc
x86/asm/entry/32: Simplify the zeroing of pt_regs->r8..r11 in the int80 code path

32-bit syscall entry points do not save the complete pt_regs struct,
they leave some fields uninitialized. However, they must be
careful to not leak uninitialized data in pt_regs->r8..r11 to
ptrace users.

CLEAR_RREGS macro is used to zero these fields out when needed.

However, in the int80 code path this zeroing is unconditional.
This patch simplifies it by storing zeroes there right away,
when pt_regs is constructed on stack.

This uses shorter instructions:

   text    data     bss     dec     hex filename
   1423       0       0    1423     58f ia32entry.o.before
   1407       0       0    1407     57f ia32entry.o

Compile-tested.

Signed-off-by: Denys Vlasenko <[email protected]>
Cc: Alexei Starovoitov <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: Andy Lutomirski <[email protected]>
Cc: Borislav Petkov <[email protected]>
Cc: Brian Gerst <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
Cc: H. Peter Anvin <[email protected]>
Cc: Kees Cook <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Oleg Nesterov <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Steven Rostedt <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Will Drewry <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
arch/x86/entry/ia32entry.S
This page took 0.050919 seconds and 4 git commands to generate.