From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-it0-f72.google.com (mail-it0-f72.google.com [209.85.214.72]) by kanga.kvack.org (Postfix) with ESMTP id 27C1B6B3143 for ; Fri, 24 Aug 2018 15:32:11 -0400 (EDT) Received: by mail-it0-f72.google.com with SMTP id q5-v6so2400414ith.1 for ; Fri, 24 Aug 2018 12:32:11 -0700 (PDT) Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id d65-v6sor669452ite.65.2018.08.24.12.32.09 for (Google Transport Security); Fri, 24 Aug 2018 12:32:09 -0700 (PDT) MIME-Version: 1.0 References: <20180822153012.173508681@infradead.org> <20180822154046.823850812@infradead.org> <20180822155527.GF24124@hirez.programming.kicks-ass.net> <20180823134525.5f12b0d3@roar.ozlabs.ibm.com> <776104d4c8e4fc680004d69e3a4c2594b638b6d1.camel@au1.ibm.com> <20180823133958.GA1496@brain-police> <20180824084717.GK24124@hirez.programming.kicks-ass.net> <20180824180438.GS24124@hirez.programming.kicks-ass.net> <56A9902F-44BE-4520-A17C-26650FCC3A11@gmail.com> In-Reply-To: <56A9902F-44BE-4520-A17C-26650FCC3A11@gmail.com> From: Linus Torvalds Date: Fri, 24 Aug 2018 12:31:57 -0700 Message-ID: Subject: Re: TLB flushes on fixmap changes Content-Type: text/plain; charset="UTF-8" Sender: owner-linux-mm@kvack.org List-ID: To: Nadav Amit Cc: Peter Zijlstra , Will Deacon , Benjamin Herrenschmidt , Nick Piggin , Andrew Lutomirski , the arch/x86 maintainers , Borislav Petkov , Rik van Riel , Jann Horn , Adin Scannell , Dave Hansen , Linux Kernel Mailing List , linux-mm , David Miller , Martin Schwidefsky , Michael Ellerman On Fri, Aug 24, 2018 at 11:36 AM Nadav Amit wrote: > > > > > Urgh.. weren't the fixmaps per cpu? Bah, I remember looking at this > > during PTI, but I seem to have forgotten everything again. > > [ Changed the title. Sorry for hijacking the thread. ] > > Since: > > native_set_fixmap()->set_pte_vaddr()->pgd_offset_k() The fixmaps should be entirely fixed after bootup to constant mappings, except for the KMAP ones, and they are indexed per-cpu. That's what my mental model is, at least. Can you actually find something that changes the fixmaps after boot (again, ignoring kmap)? Maybe worth adding some debugging to verify that? Linus