From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8E4CAC46467 for ; Wed, 4 Jan 2023 13:31:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239427AbjADNbh (ORCPT ); Wed, 4 Jan 2023 08:31:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34976 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234869AbjADNbO (ORCPT ); Wed, 4 Jan 2023 08:31:14 -0500 Received: from mail.skyhub.de (mail.skyhub.de [5.9.137.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 363FE3477A; Wed, 4 Jan 2023 05:26:03 -0800 (PST) Received: from zn.tnic (p5de8e9fe.dip0.t-ipconnect.de [93.232.233.254]) (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 097FB1EC0645; Wed, 4 Jan 2023 14:26:02 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1672838762; 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=FH7vooKVlXi8JXPp9/BJ56jjaowYk9mqB61YmVsNKDY=; b=GO4vyVDzHMpJmiYd5Tccuux/3Y1KXg3kwYiY1wBIRAyzCwKt2qAVftie65t8DdJtghsUAj aCRYFqLpilCsMrFEGOxO1woqBtsVpSVaqx66/pS1y92uu79i9mt0ZwD7fYKKN7QnIKx1ma rvuMhDCLs3lRpJl8yxcTTZAFxpVTU9w= Date: Wed, 4 Jan 2023 14:25:57 +0100 From: Borislav Petkov To: "Edgecombe, Rick P" Cc: "akpm@linux-foundation.org" , "tglx@linutronix.de" , "linux-arch@vger.kernel.org" , "kcc@google.com" , "Lutomirski, Andy" , "nadav.amit@gmail.com" , "kirill.shutemov@linux.intel.com" , "Schimpe, Christina" , "peterz@infradead.org" , "corbet@lwn.net" , "linux-kernel@vger.kernel.org" , "jannh@google.com" , "dethoma@microsoft.com" , "x86@kernel.org" , "pavel@ucw.cz" , "rdunlap@infradead.org" , "linux-api@vger.kernel.org" , "john.allen@amd.com" , "arnd@arndb.de" , "jamorris@linux.microsoft.com" , "rppt@kernel.org" , "bsingharora@gmail.com" , "mike.kravetz@oracle.com" , "oleg@redhat.com" , "fweimer@redhat.com" , "keescook@chromium.org" , "gorcunov@gmail.com" , "Yu, Yu-cheng" , "andrew.cooper3@citrix.com" , "hpa@zytor.com" , "mingo@redhat.com" , "hjl.tools@gmail.com" , "linux-mm@kvack.org" , "Syromiatnikov, Eugene" , "Yang, Weijiang" , "linux-doc@vger.kernel.org" , "dave.hansen@linux.intel.com" , "Eranian, Stephane" Subject: Re: [PATCH v4 11/39] x86/mm: Update pte_modify for _PAGE_COW Message-ID: References: <20221203003606.6838-1-rick.p.edgecombe@intel.com> <20221203003606.6838-12-rick.p.edgecombe@intel.com> <060f1009199b09b7f8b9698e9f6f8375d9d1b66d.camel@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <060f1009199b09b7f8b9698e9f6f8375d9d1b66d.camel@intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-api@vger.kernel.org On Tue, Dec 27, 2022 at 11:31:37PM +0000, Edgecombe, Rick P wrote: > The comment is referring to the dirty bits possibly coming from > newprot, Ah right, ofc. > but looking at it now I think the code was broken trying to > fix the recent soft dirty test breakage. Now it might lose pre-existing > dirty bits in the pte unessarily... I think. Right, does this code need to be simplified? I.e., match the shadow stack PTE (Write=0,Dirty=1) and handle that in a separate helper? So that the flows are separate. I'm not a mm guy but this function makes my head hurt - dunno about other folks. :) Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette