From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Google-Smtp-Source: ACJfBotvlUKSAuejglNogmzp8z6bPmsUIZ9c6sHdnokTfLc369wfWQr8ZuCO1WinWwhIB2e7xMSo ARC-Seal: i=1; a=rsa-sha256; t=1516355826; cv=none; d=google.com; s=arc-20160816; b=JeGPFiolhae3XQ/DOcU50RCBCuL2LudIph0oM8ZrOLnbkra0zkUfmeT6bh0M5ad9eq vf/1R1gKqtCttTCTgXDNa8J1yh1ATo6SQbE9y/GnvdzsKD6QYE+cF0n+gQxA4Er1mooT SW7NEOExZk1/KZaPtYh1OFedX/rG9UTt2xAlK2EGo0LoJn3U2ZYQ7ivA7gdxqmR97AXT mkaDwkJ50rVKNbasX/PPenhaOefXqXw4PhjRiyn9xYkrGaHQ4TpKNU3q/8GIg9J77I0I IBjMut+F4mWaWp+cTcEovShpP+mo8e5Mro3gzO+9Pt4wC3cVWHN5uiHF2bTHJ3galfM4 1GAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:cc:to:from:date:dkim-signature :arc-authentication-results; bh=BV8lM+Ug9fEhqzXtrvRjR8gQTY4/ylFVafJSFcMyEPo=; b=T3qsiYuLcJ1wjpAX0kR685rNuAqHIUcQAet0mle3BylESPyWa6KlVGztKJJwmkdnM8 6Wf8KRW6+dd49CN0rwFy4kNAqad9fCO6yIffyYs5y6dg5Xiut4vJB7pq89Q8vu/rBVy0 hjBkOabmmO/clw+YUADJrUbQc3jNeq0CfHgspLYfg0fpIZNeSz7ls35cMpPXPVObYAyf qKuDmxXkH3ghy0OewjDUUTCgwFYHj4CW0NwMN24UETalt7B+FB1oFNW32imdVjPkJ3bs /nvGTp7FNjOFHRSitNk8el59w5aFfZFha/JghXz+i76L/+C8QZrcS+RyWu+I4tDmEvSG lk7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@8bytes.org header.s=mail-1 header.b=ftNF9S+m; spf=pass (google.com: domain of joro@8bytes.org designates 81.169.241.247 as permitted sender) smtp.mailfrom=joro@8bytes.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=8bytes.org Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@8bytes.org header.s=mail-1 header.b=ftNF9S+m; spf=pass (google.com: domain of joro@8bytes.org designates 81.169.241.247 as permitted sender) smtp.mailfrom=joro@8bytes.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=8bytes.org Date: Fri, 19 Jan 2018 10:57:05 +0100 From: Joerg Roedel To: Andy Lutomirski Cc: Brian Gerst , Thomas Gleixner , Ingo Molnar , "H . Peter Anvin" , X86 ML , LKML , Linux-MM , Linus Torvalds , Dave Hansen , Josh Poimboeuf , Juergen Gross , Peter Zijlstra , Borislav Petkov , Jiri Kosina , Boris Ostrovsky , David Laight , Denys Vlasenko , Eduardo Valentin , Greg KH , Will Deacon , "Liguori, Anthony" , Daniel Gruss , Hugh Dickins , Kees Cook , Andrea Arcangeli , Waiman Long , Joerg Roedel Subject: Re: [PATCH 03/16] x86/entry/32: Leave the kernel via the trampoline stack Message-ID: <20180119095705.GZ28161@8bytes.org> References: <1516120619-1159-1-git-send-email-joro@8bytes.org> <1516120619-1159-4-git-send-email-joro@8bytes.org> <20180117092442.GJ28161@8bytes.org> <20180117141006.GR28161@8bytes.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: =?utf-8?q?1589767842589204195?= X-GMAIL-MSGID: =?utf-8?q?1590014327116233697?= X-Mailing-List: linux-kernel@vger.kernel.org List-ID: On Wed, Jan 17, 2018 at 10:12:32AM -0800, Andy Lutomirski wrote: > I would optimize for simplicity, not speed. You're already planning > to write to CR3, which is serializing, blows away the TLB, *and* takes > the absurdly large amount of time that the microcode needs to blow > away the TLB. Okay, so I am going to do the stack-switch before pt_regs is restored. This is at least better than playing games with hiding the entry/exit %esp somewhere in stack-memory. Thanks, Joerg