From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753241AbaJARxj (ORCPT ); Wed, 1 Oct 2014 13:53:39 -0400 Received: from terminus.zytor.com ([198.137.202.10]:42449 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751236AbaJARxi (ORCPT ); Wed, 1 Oct 2014 13:53:38 -0400 Message-ID: <542C3F92.9090409@zytor.com> Date: Wed, 01 Oct 2014 10:53:22 -0700 From: "H. Peter Anvin" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.1 MIME-Version: 1.0 To: Thomas Gleixner , Andy Lutomirski CC: Sebastian Lackner , X86 ML , Ingo Molnar , Anish Bhatt , "linux-kernel@vger.kernel.org" , Chuck Ebbert Subject: Re: [PATCH 1/2] x86_64,entry: Filter RFLAGS.NT on entry from userspace References: <542B2305.9060805@fds-team.de> <542C3EEB.8050903@zytor.com> In-Reply-To: <542C3EEB.8050903@zytor.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/01/2014 10:50 AM, H. Peter Anvin wrote: > On 09/30/2014 04:21 PM, Thomas Gleixner wrote: >>> >>> If we ever want those cycles back, I bet that the compat sysenter path >>> could be trimmed down a lot. For example, I think that all of the >>> zero-extension stuff is unnecessary now that we have the magic syscall >>> wrappers for all (?) syscalls. >> >> Emphasis on "(?)". So yes, once we verified that .... >> > > I don't think that's true. Many system calls use exactly the same entry > point for compat and noncompat calls. I don't see any value in > replicating that code in every system call. > > The only time we need to do anything horribly special is when we have an > argument which is a signed long, which fortunately is not at all common. > Also, we still need to shuffle registers around to match the x86-64 calling convention. Zero extension as part of that shuffle is free. -hpa