Messages in this thread | | | Date | Fri, 20 Mar 2015 17:38:37 +0100 | From | Borislav Petkov <> | Subject | Re: [PATCH 4/5] x86/entry_64.S: get rid of FIXUP_TOP_OF_STACK/RESTORE_TOP_OF_STACK |
| |
On Thu, Mar 19, 2015 at 06:17:48PM +0100, Denys Vlasenko wrote: > FIXUP_TOP_OF_STACK is only necessary because we don't save %r11 > to pt_regs->r11 on SYSCALL64 fast path, but we want ptrace to see > it populated. > > Bite the bullet, add a single additional PUSH insn, and remove > FIXUP_TOP_OF_STACK. > > RESTORE_TOP_OF_STACK is already a nop. Remove it too. > > On SandyBridge CPU, it does not get slower: > measured 54.22 ns per getpid syscall before and after last two changes > on defconfig kernel. > > Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com> > CC: Linus Torvalds <torvalds@linux-foundation.org> > CC: Steven Rostedt <rostedt@goodmis.org> > CC: Ingo Molnar <mingo@kernel.org> > CC: Borislav Petkov <bp@alien8.de> > CC: "H. Peter Anvin" <hpa@zytor.com> > CC: Andy Lutomirski <luto@amacapital.net> > CC: Oleg Nesterov <oleg@redhat.com> > CC: Frederic Weisbecker <fweisbec@gmail.com> > CC: Alexei Starovoitov <ast@plumgrid.com> > CC: Will Drewry <wad@chromium.org> > CC: Kees Cook <keescook@chromium.org> > CC: x86@kernel.org > CC: linux-kernel@vger.kernel.org > --- > arch/x86/kernel/entry_64.S | 35 ++--------------------------------- > 1 file changed, 2 insertions(+), 33 deletions(-)
Nice diffstat.
Acked-by: Borislav Petkov <bp@suse.de>
-- Regards/Gruss, Boris.
ECO tip #101: Trim your mails when you reply. --
| |