From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl0-f70.google.com (mail-pl0-f70.google.com [209.85.160.70]) by kanga.kvack.org (Postfix) with ESMTP id 1E3856B0279 for ; Fri, 13 Jul 2018 19:22:09 -0400 (EDT) Received: by mail-pl0-f70.google.com with SMTP id 39-v6so20570733ple.6 for ; Fri, 13 Jul 2018 16:22:09 -0700 (PDT) Received: from mail.kernel.org (mail.kernel.org. [198.145.29.99]) by mx.google.com with ESMTPS id l1-v6si23545389pgb.464.2018.07.13.16.22.08 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 13 Jul 2018 16:22:08 -0700 (PDT) Received: from mail-wm0-f42.google.com (mail-wm0-f42.google.com [74.125.82.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6CCCA208B0 for ; Fri, 13 Jul 2018 23:22:07 +0000 (UTC) Received: by mail-wm0-f42.google.com with SMTP id z6-v6so5550557wma.0 for ; Fri, 13 Jul 2018 16:22:07 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <1531308586-29340-31-git-send-email-joro@8bytes.org> References: <1531308586-29340-1-git-send-email-joro@8bytes.org> <1531308586-29340-31-git-send-email-joro@8bytes.org> From: Andy Lutomirski Date: Fri, 13 Jul 2018 16:21:45 -0700 Message-ID: Subject: Re: [PATCH 30/39] x86/mm/pti: Clone entry-text again in pti_finalize() Content-Type: text/plain; charset="UTF-8" Sender: owner-linux-mm@kvack.org List-ID: To: Joerg Roedel Cc: Thomas Gleixner , Ingo Molnar , "H . Peter Anvin" , X86 ML , LKML , Linux-MM , Linus Torvalds , Andy Lutomirski , Dave Hansen , Josh Poimboeuf , Juergen Gross , Peter Zijlstra , Borislav Petkov , Jiri Kosina , Boris Ostrovsky , Brian Gerst , David Laight , Denys Vlasenko , Eduardo Valentin , Greg KH , Will Deacon , "Liguori, Anthony" , Daniel Gruss , Hugh Dickins , Kees Cook , Andrea Arcangeli , Waiman Long , Pavel Machek , "David H . Gutteridge" , Joerg Roedel On Wed, Jul 11, 2018 at 4:29 AM, Joerg Roedel wrote: > From: Joerg Roedel > > The mapping for entry-text might have changed in the kernel > after it was cloned to the user page-table. Clone again > to update the user page-table to bring the mapping in sync > with the kernel again. Can't we just defer pti_init() until after mark_readonly()? What am I missing?