Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp3605980pxu; Tue, 8 Dec 2020 17:07:39 -0800 (PST) X-Google-Smtp-Source: ABdhPJwo6DgUKpLfQH2evyZeNLsSrKoFXC/F02//qZIaVvKwHnS3M9MPklbaHSCapKUfIl+nWX2N X-Received: by 2002:a05:6402:307c:: with SMTP id bs28mr609068edb.186.1607476059667; Tue, 08 Dec 2020 17:07:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607476059; cv=none; d=google.com; s=arc-20160816; b=DdYrEZo/Iifxdfn+Rs7j+PxRTAJkvKYzyL+On3W+XTBs1un6T1rIrkTpvbyXZUDc2M 0EZ7EbZhzezmAanWM8JrHv8qR5L/sSq7ImTZObxEEkU4Q5ynilhUK3BhsO96U73H3v8y sxCobibXWr86HPac8+qmCfy1gQ8idAZTLuQJy4Rs4V5oOsTyXoXYPt+9th47qvpvSXLN f7j6izAdxgwgwLlanbu03UmjaVWciG9bn3vXPIG3R8pAI/FE066gmCglafNZ/FH62/Zm C20JhxSWvAYrCPfgrnSMT9bqjy7+pc4OVqag0DS8JPm3fpxwRIN3JZSEOsbN7gM9H3Rf JGPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=N7zLgo+iGnV/6dQc9oAjeLX3V0c+bnEUyOPpx3AqhUE=; b=rxih6bPMItC02eMvKFChaCscCIVAaxczhIsJ8wCNs0sJEb52VWngxArCinCmM+6XIF R2raUi7dJ08SOc+MsqA6amxdvd6WpGoVislH8QWKAd/wk3t5bpgqrXJdPwEWprJQL9pj jRSQw455Ieu771VFzc3cMR3O1UNDx7YXMYsx5xwfgwAN30uQFjASc9yuX5xyH8BVMe45 dZrV4cj2qTnvR0NmoERDGojNpZtbc9kDpj3SUNZfl6C3BQ+k5i6LqM5qbiedr9Wu+fEg NKwcassoF7CP+bRsegL7z/ErALUer5xq5IuykhJu2JBoa/lgmF08V5opEEXONe0yqoSC G+9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=qVpEjpAW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ch11si131498edb.384.2020.12.08.17.07.17; Tue, 08 Dec 2020 17:07:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=qVpEjpAW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731327AbgLHUQK (ORCPT + 99 others); Tue, 8 Dec 2020 15:16:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36828 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731152AbgLHUPM (ORCPT ); Tue, 8 Dec 2020 15:15:12 -0500 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 96EECC0613D6; Tue, 8 Dec 2020 12:14:32 -0800 (PST) Received: from zn.tnic (p200300ec2f0f08004da90e847a90bd48.dip0.t-ipconnect.de [IPv6:2003:ec:2f0f:800:4da9:e84:7a90:bd48]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 433751EC053F; Tue, 8 Dec 2020 19:47:27 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1607453247; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=N7zLgo+iGnV/6dQc9oAjeLX3V0c+bnEUyOPpx3AqhUE=; b=qVpEjpAW6ERZtUChtOctB0atXOEQ9sLnL3RAG8ruZzpOCH41xOHx3EnwVn4iyhbQl9vBz4 HI/Yk9gZwrTzU7nxtY7YhtvWO9Sj8BsNle4GW/6iHTq6qVmAR4dqc+EmS78ViFZXu7SFiJ JS2rHxlWADJXb4GziJW4KqDoA5cUXM0= Date: Tue, 8 Dec 2020 19:47:27 +0100 From: Borislav Petkov To: "Yu, Yu-cheng" Cc: x86@kernel.org, "H. Peter Anvin" , Thomas Gleixner , Ingo Molnar , linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-mm@kvack.org, linux-arch@vger.kernel.org, linux-api@vger.kernel.org, Arnd Bergmann , Andy Lutomirski , Balbir Singh , Cyrill Gorcunov , Dave Hansen , Eugene Syromiatnikov , Florian Weimer , "H.J. Lu" , Jann Horn , Jonathan Corbet , Kees Cook , Mike Kravetz , Nadav Amit , Oleg Nesterov , Pavel Machek , Peter Zijlstra , Randy Dunlap , "Ravi V. Shankar" , Vedvyas Shanbhogue , Dave Martin , Weijiang Yang , Pengfei Xu Subject: Re: [PATCH v15 08/26] x86/mm: Introduce _PAGE_COW Message-ID: <20201208184727.GF27920@zn.tnic> References: <20201110162211.9207-1-yu-cheng.yu@intel.com> <20201110162211.9207-9-yu-cheng.yu@intel.com> <20201208175014.GD27920@zn.tnic> <218503f6-eec1-94b0-8404-6f92c55799e3@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <218503f6-eec1-94b0-8404-6f92c55799e3@intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Dec 08, 2020 at 10:25:15AM -0800, Yu, Yu-cheng wrote: > > Both are "R/O + _PAGE_COW". Where's the difference? The dirty bit? > > The PTEs are the same for both (a) and (b), but come from different routes. Do not be afraid to go into detail and explain to me what those routes are please. > > > (e) A page where the processor observed a Write=1 PTE, started a write, set > > > Dirty=1, but then observed a Write=0 PTE. > > > > How does that happen? Something changed the PTE's W bit to 0 in-between? > > Yes. Also do not scare from going into detail and explaining what you mean here. Example? > > Does _PAGE_COW mean dirty too? > > Yes. Basically [read-only & dirty] is created by software. Now the > software uses a different bit. That convention: "[read-only & dirty] is created by software." needs some prominent writeup somewhere explaining what it is. Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette