From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752405AbdLLUiL (ORCPT ); Tue, 12 Dec 2017 15:38:11 -0500 Received: from Galois.linutronix.de ([146.0.238.70]:34403 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751400AbdLLUiH (ORCPT ); Tue, 12 Dec 2017 15:38:07 -0500 Date: Tue, 12 Dec 2017 21:37:52 +0100 (CET) From: Thomas Gleixner To: Dave Hansen cc: Linus Torvalds , LKML , the arch/x86 maintainers , Andy Lutomirsky , Peter Zijlstra , Borislav Petkov , Greg KH , Kees Cook , Hugh Dickins , Brian Gerst , Josh Poimboeuf , Denys Vlasenko , Boris Ostrovsky , Juergen Gross , David Laight , Eduardo Valentin , "Liguori, Anthony" , Will Deacon , linux-mm Subject: Re: [patch 13/16] x86/ldt: Introduce LDT write fault handler In-Reply-To: <212680b8-6f8d-f785-42fd-61846553570d@intel.com> Message-ID: References: <20171212173221.496222173@linutronix.de> <20171212173334.345422294@linutronix.de> <212680b8-6f8d-f785-42fd-61846553570d@intel.com> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 12 Dec 2017, Dave Hansen wrote: > On 12/12/2017 11:21 AM, Thomas Gleixner wrote: > > The only critical interaction is the return to user path (user CS/SS) and > > we made sure with the LAR touching that these are precached in the CPU > > before we go into fragile exit code. > > How do we make sure that it _stays_ cached? > > Surely there is weird stuff like WBINVD or SMI's that can come at very > inconvenient times and wipe it out of the cache. This does not look like cache in the sense of memory cache. It seems to be CPU internal state and I just stuffed WBINVD and alternatively CLFLUSH'ed the entries after the 'touch' via LAR. Still works. Thanks, tglx