Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp2293271pxb; Wed, 9 Feb 2022 15:22:36 -0800 (PST) X-Google-Smtp-Source: ABdhPJzTGhvkbFdjkkVxgFymMRmvR1kMSJnIYXCNXPqfcfneex4rEMwWK3Hf6SV2t2IudjoEwD8H X-Received: by 2002:a05:6a00:1785:: with SMTP id s5mr4641722pfg.72.1644448956767; Wed, 09 Feb 2022 15:22:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644448956; cv=none; d=google.com; s=arc-20160816; b=M0eL123B/vCO2+wL9Q9lELlIhr31HqmFFp63AMe23wCWyrMZMuhSykfvG95d4GaGFo SMFlkOLD4CyBhRisZK69/ROV3L/D28KwZtNvb/HzXes2R3Zo0ItuMh0RT6DQHC3kiv5Q codf2rPyRF/BLd79M5Qljcl1ggwe2zLh7Leb7pfNkonE+MNOk1AkI5LpixzWbjojwp4P aY/+Xt4pM13jy5bwzcq/rxJIapHcUKN2ilkzL3LVqnax46QrRMx0ijIOVHSKhspU932H 8U8wgMfKdk4AJ9DPYtPRf3OB893Nt1Y3ygMqdLLVjXiLFdYNzAOtC9oY4jRURiOZ+Nba 8JWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:subject :from:references:cc:to:content-language:user-agent:mime-version:date :message-id:dkim-signature; bh=5tmjY44xe8t26wT77t0PPY1VYTPCGq00X9U0+JRXnc0=; b=p+ZKdfAhvOZrw7Tp8B/fNI45+5QAj15+G/tpgdZggxRspItag9rvu5dR1pz1orsbBZ bZppnk+aYnFENf3ZJoJt0L7c1XAyY4c8pSUcjF4wjmIQE6J1b4XyeIeoBg1R4btBZzKC RE1kegB89N5j7gQiAcTdMfOZYBP9ZEtl2FXzHQwnRRwsuFU9+YjJ1xesSkBLSaFeTKqk y7crgwbYAg7yuwzgozUQmI45TMr3LOoqWTsNXM8+DKEXKSEmdtEw+zYO9kVdlfeoF5u8 AsTuP13FvvjvnMavert9l0H42j6aaVH8pI5/afkEyXg+adtpYewJXTxTsgYM5LIbKrNM Xw8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=hDMRLkNR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id d2si3836615pfr.362.2022.02.09.15.22.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Feb 2022 15:22:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=hDMRLkNR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id AB55DE05CE18; Wed, 9 Feb 2022 15:18:20 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236524AbiBIWwN (ORCPT + 99 others); Wed, 9 Feb 2022 17:52:13 -0500 Received: from gmail-smtp-in.l.google.com ([23.128.96.19]:57844 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231361AbiBIWwL (ORCPT ); Wed, 9 Feb 2022 17:52:11 -0500 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1BD88E019775; Wed, 9 Feb 2022 14:52:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1644447131; x=1675983131; h=message-id:date:mime-version:to:cc:references:from: subject:in-reply-to:content-transfer-encoding; bh=6ftK2HF3TDrt8ahBasUGsCpZEI46Bh6r6PK2GktLqXA=; b=hDMRLkNRn2RVdN0+BO58MMykoPuKsqmLqRSYmO/Y/LgaN6Fr4TvOhs+D Gh+SGytMELimv55N7ZnI3cUbjgqQxR+yrilphoN3V6D80Of33fc0EWe/T dQgPk6q8AGpM8XODXJgMTkCkFBr7ct7MazLcZvhEU++Df/meDB/Pyw0vB 7PBmKoV7B1726LhziIWYMTizrKxOcZ+4g/kn85zOwDrbLkBiyWv3C8U4x kFCRSNEXLFH3gJkGt2+/kgkYYMb1toosXwSFJDGanBwmWU4lNGuh+Bwhl YJFvaOMq0+wfkF6utWHce5m2OvB4LSeTX5wcZzX4w6cGLkFOM8tAZ5OcA A==; X-IronPort-AV: E=McAfee;i="6200,9189,10253"; a="232924868" X-IronPort-AV: E=Sophos;i="5.88,356,1635231600"; d="scan'208";a="232924868" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Feb 2022 14:52:10 -0800 X-IronPort-AV: E=Sophos;i="5.88,356,1635231600"; d="scan'208";a="701445964" Received: from sanvery-mobl.amr.corp.intel.com (HELO [10.212.232.139]) ([10.212.232.139]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Feb 2022 14:52:09 -0800 Message-ID: <37426b64-2139-dc24-c7be-f3cefa4f0dd9@intel.com> Date: Wed, 9 Feb 2022 14:52:08 -0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Content-Language: en-US To: Rick Edgecombe , 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 , Borislav Petkov , 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" , Dave Martin , Weijiang Yang , "Kirill A . Shutemov" , joao.moreira@intel.com, John Allen , kcc@google.com, eranian@google.com Cc: Yu-cheng Yu References: <20220130211838.8382-1-rick.p.edgecombe@intel.com> <20220130211838.8382-21-rick.p.edgecombe@intel.com> From: Dave Hansen Subject: Re: [PATCH 20/35] mm: Update can_follow_write_pte() for shadow stack In-Reply-To: <20220130211838.8382-21-rick.p.edgecombe@intel.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,RDNS_NONE,SPF_HELO_NONE, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 1/30/22 13:18, Rick Edgecombe wrote: > Like a writable data page, a shadow stack page is writable, and becomes > read-only during copy-on-write, but it is always dirty. One other thing... The language in these changelogs is a bit sloppy. For instance, what does "always dirty" mean here? pte_dirty()? Or strictly _PAGE_DIRTY? In other words, logically dirty, or literally "has *the* dirty bit set"?