summaryrefslogtreecommitdiff
path: root/arch/x86/entry/entry_32.S
diff options
context:
space:
mode:
authorDenys Vlasenko <dvlasenk@redhat.com>2015-06-02 19:35:10 +0200
committerIngo Molnar <mingo@kernel.org>2015-06-05 13:22:21 +0200
commit61b1e3e782d6784b714c0d80de529e0737d0e79c (patch)
tree09c069fe2b31d6c49f5ebb152f6a512ba93a31fe /arch/x86/entry/entry_32.S
parent5ca6f70f387b4f82903037cc3c5488e2c97dcdbc (diff)
downloadlwn-61b1e3e782d6784b714c0d80de529e0737d0e79c.tar.gz
lwn-61b1e3e782d6784b714c0d80de529e0737d0e79c.zip
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 <dvlasenk@redhat.com> Cc: Alexei Starovoitov <ast@plumgrid.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Andy Lutomirski <luto@amacapital.net> Cc: Borislav Petkov <bp@alien8.de> Cc: Brian Gerst <brgerst@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Kees Cook <keescook@chromium.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Oleg Nesterov <oleg@redhat.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Will Drewry <wad@chromium.org> Link: http://lkml.kernel.org/r/1433266510-2938-1-git-send-email-dvlasenk@redhat.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86/entry/entry_32.S')
0 files changed, 0 insertions, 0 deletions