From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752820AbdLEWLn (ORCPT ); Tue, 5 Dec 2017 17:11:43 -0500 Received: from mga04.intel.com ([192.55.52.120]:56917 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752587AbdLEWJB (ORCPT ); Tue, 5 Dec 2017 17:09:01 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,365,1508828400"; d="scan'208";a="181678407" Subject: Re: [patch 53/60] x86/mm: Use/Fix PCID to optimize user/kernel switches To: Peter Zijlstra , Andy Lutomirski References: <20171204140706.296109558@linutronix.de> <20171204150609.179192470@linutronix.de> <20171205220557.GX3165@worktop.lehotels.local> Cc: Thomas Gleixner , LKML , X86 ML , Linus Torvalds , Borislav Petkov , Greg KH , Kees Cook , Hugh Dickins , Brian Gerst , Josh Poimboeuf , Denys Vlasenko , Rik van Riel , Boris Ostrovsky , Juergen Gross , David Laight , Eduardo Valentin , aliguori@amazon.com, Will Deacon , Daniel Gruss From: Dave Hansen Message-ID: <7b6502fa-b5be-b8ab-eb82-fcb0fb906f46@intel.com> Date: Tue, 5 Dec 2017 14:08:59 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <20171205220557.GX3165@worktop.lehotels.local> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/05/2017 02:05 PM, Peter Zijlstra wrote: >> I haven't checked that hard which patch introduces this bug, but it >> seems that, with this applied, nothing propagates >> non-mm-switch-related flushes to usermode. Shouldn't >> flush_tlb_func_common() contain a call to invalidate_user_asid() near >> the bottom? Alternatively, it could be in local_flush_tlb() and >> __flush_tlb_single() (or whatever the hell the flush-one-usermode-TLB >> function ends up being called). > __native_flush_tlb_single() has the invalidate_user_asid() > __native_flush_tlb() has the invalidate_user_asid(). > > Which should be exactly that last option you mention. I can also see INVPCIDs in profiles, so it's definitely getting used.