From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932078AbcCLPiU (ORCPT ); Sat, 12 Mar 2016 10:38:20 -0500 Received: from mail-wm0-f66.google.com ([74.125.82.66]:34421 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753260AbcCLPiM (ORCPT ); Sat, 12 Mar 2016 10:38:12 -0500 Date: Sat, 12 Mar 2016 16:38:08 +0100 From: Ingo Molnar To: Denys Vlasenko Cc: Steven Rostedt , Borislav Petkov , "H. Peter Anvin" , Andy Lutomirski , Frederic Weisbecker , Will Drewry , Kees Cook , x86@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] x86/asm/entry/32: simplify pushes of zeroed pt_regs->REGs Message-ID: <20160312153808.GC17873@gmail.com> References: <1457715214-7432-1-git-send-email-dvlasenk@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1457715214-7432-1-git-send-email-dvlasenk@redhat.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Denys Vlasenko wrote: > Use of a temporary R8 register here seems to be unnecessary. > > "push %r8" is a two-byte insn (it needs REX prefix to specify R8), > "push $0" is two-byte too. It seems just using the latter would be > no worse. > > Thus, code had an unnecessary "xorq %r8,%r8" insn. Neat! > It probably costs nothing in execution time here since we are probably > limited by store bandwidth at this point, but still. > > Run-tested under QEMU: 32-bit calls still work: > > / # ./test_syscall_vdso32 Did you manage to test all 3 compat variants: > @@ -72,24 +72,23 @@ ENTRY(entry_SYSENTER_compat) > @@ -205,17 +204,16 @@ ENTRY(entry_SYSCALL_compat) > @@ -316,11 +314,10 @@ ENTRY(entry_INT80_compat) ? Thanks, Ingo