From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754547AbbCIQCi (ORCPT ); Mon, 9 Mar 2015 12:02:38 -0400 Received: from mail-wi0-f179.google.com ([209.85.212.179]:42981 "EHLO mail-wi0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751542AbbCIQCh (ORCPT ); Mon, 9 Mar 2015 12:02:37 -0400 Date: Mon, 9 Mar 2015 17:02:32 +0100 From: Ingo Molnar To: Denys Vlasenko Cc: Andy Lutomirski , Linus Torvalds , Steven Rostedt , Borislav Petkov , "H. Peter Anvin" , Oleg Nesterov , Frederic Weisbecker , Alexei Starovoitov , Will Drewry , Kees Cook , x86@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/2] x86: save r11 into pt_regs->flags on SYSCALL64 fastpath Message-ID: <20150309160232.GA21787@gmail.com> References: <1425847750-23362-1-git-send-email-dvlasenk@redhat.com> <1425847750-23362-2-git-send-email-dvlasenk@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1425847750-23362-2-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: > Before this patch, r11 was saved in pt_regs->r11. > Which looks natural, but requires messy shuffling to/from iret frame > whenever ptrace or e.g. iopl wants to modify flags - because > that's how this register is used by SYSCALL/SYSRET. > > This patch saves r11 in pt_regs->flags, > and uses that value for SYSRET64 insn. Shuffling is eliminated. > > stub_iopl is no longer needed: pt_regs->flags needs no fixing up. Could you please split this into two patches: R11 saving, and stub_iopl removal? For x86/asm changes we want as small changes as physically possible. Thanks, Ingo