Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935378AbeAKSrx (ORCPT + 1 other); Thu, 11 Jan 2018 13:47:53 -0500 Received: from one.firstfloor.org ([193.170.194.197]:43054 "EHLO one.firstfloor.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932703AbeAKSrv (ORCPT ); Thu, 11 Jan 2018 13:47:51 -0500 Date: Thu, 11 Jan 2018 10:47:50 -0800 From: Andi Kleen To: Brian Gerst Cc: Andi Kleen , Thomas Gleixner , the arch/x86 maintainers , Linux Kernel Mailing List , Linus Torvalds , David Woodhouse , Paul Turner , Andy Lutomirski , Peter Zijlstra , Tom Lendacky , Tim Chen , Greg Kroah-Hartman , Dave Hansen , Jiri Kosina , Andi Kleen Subject: Re: [PATCH v1 3/8] x86/entry/clearregs: Clear registers for 64bit SYSCALL Message-ID: <20180111184750.y42sv4hn7e3r3f3k@two.firstfloor.org> References: <20180110010328.22163-1-andi@firstfloor.org> <20180110010328.22163-4-andi@firstfloor.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On Wed, Jan 10, 2018 at 10:35:58PM -0500, Brian Gerst wrote: > > @@ -263,6 +271,7 @@ entry_SYSCALL_64_fastpath: > > #endif > > ja 1f /* return -ENOSYS (already in pt_regs->ax) */ > > movq %r10, %rcx > > + xor %r10, %r10 > > RCX is already clear, so xchgq %r10, %rcx will be simpler. XOR is special cased by the hardware, so it's always more efficient. -Andi >