Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754209AbbG0UuO (ORCPT ); Mon, 27 Jul 2015 16:50:14 -0400 Received: from mail-lb0-f176.google.com ([209.85.217.176]:34781 "EHLO mail-lb0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750858AbbG0UuM (ORCPT ); Mon, 27 Jul 2015 16:50:12 -0400 MIME-Version: 1.0 In-Reply-To: <1438029228-20560-1-git-send-email-dvlasenk@redhat.com> References: <1438029228-20560-1-git-send-email-dvlasenk@redhat.com> From: Andy Lutomirski Date: Mon, 27 Jul 2015 13:49:51 -0700 Message-ID: Subject: Re: [PATCH 1/5] x86/asm/entry/32: Massage SYSENTER32 fast path to be nearly identical to SYSCALL32 To: Denys Vlasenko Cc: Ingo Molnar , Linus Torvalds , "Krzysztof A. Sobiecki" , Steven Rostedt , Borislav Petkov , "H. Peter Anvin" , Oleg Nesterov , Frederic Weisbecker , Alexei Starovoitov , Will Drewry , Kees Cook , X86 ML , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 993 Lines: 22 On Mon, Jul 27, 2015 at 1:33 PM, Denys Vlasenko wrote: > This change swaps a few instructions in final register restoring/zeroing > section of SYSENTER fast path, and adds/deletes a few empty lines. > > After this, the difference between SYSENTER and SYCALL fast paths > (after the prologue which saved pt_regs) is very small: > they differ merely in the choice of register to hold arg6 (EBP or R9) > and in the value of EDX on exit: SYSENTER ABI doesn't need to preserve it, > so it is zeroed. SYSCALL preserves it: Acked-by: Andy Lutomirski (I haven't tested it, but this looks Obviously Correct (tm) and there's no funny stack manipulation in the middle of the changes that could break things.) --Andy -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/