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 61440C41535 for ; Tue, 20 Dec 2022 19:12:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233983AbiLTTMH (ORCPT ); Tue, 20 Dec 2022 14:12:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49880 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229536AbiLTTMG (ORCPT ); Tue, 20 Dec 2022 14:12:06 -0500 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 61037E006; Tue, 20 Dec 2022 11:12:05 -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 812AF1EC0518; Tue, 20 Dec 2022 20:12:03 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1671563523; 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=zottXoJ/NEKpHsW/kd7TgYecyr34sKhq/L0t7TIzFDc=; b=Yht1hyw3SPwhLbr1jN7iM7vkbPRNoFAZnpsrsXf4hIVQnP9d6VPHdtXWUhkace+7M+Ikm+ I+9vCO1PbUle6DpXPFPyV4kfN0BR8EeUHgxRBlWc+s4GpQZqDSQ27I9Ev3850pVGZLuQzL zZRkKeJdaxU00wQNnf9iSZVbCdRq7IQ= Date: Tue, 20 Dec 2022 20:11:59 +0100 From: Borislav Petkov To: Rick Edgecombe 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 , Weijiang Yang , "Kirill A . Shutemov" , John Allen , kcc@google.com, eranian@google.com, rppt@kernel.org, jamorris@linux.microsoft.com, dethoma@microsoft.com, akpm@linux-foundation.org, Andrew.Cooper3@citrix.com, christina.schimpe@intel.com, Yu-cheng Yu , Christoph Hellwig Subject: Re: [PATCH v4 08/39] x86/mm: Remove _PAGE_DIRTY from kernel RO pages Message-ID: References: <20221203003606.6838-1-rick.p.edgecombe@intel.com> <20221203003606.6838-9-rick.p.edgecombe@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20221203003606.6838-9-rick.p.edgecombe@intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-api@vger.kernel.org Just typos and spelling fixes: On Fri, Dec 02, 2022 at 04:35:35PM -0800, Rick Edgecombe wrote: > From: Yu-cheng Yu > > New processors that support Shadow Stack regard Write=0,Dirty=1 PTEs as > shadow stack pages. > > In normal cases, it can be helpful to create Write=1 PTEs as also Dirty=1 > if HW dirty tracking is not needed, because if the Dirty bit is not already > set the CPU has to set Dirty=1 when it the memory gets written to. This s/it // > creates addiontal work for the CPU. "additional" > So tradional wisdom was to simply set Unknown word [tradional] in commit message. Suggestions: ['traditional', ... > the Dirty bit whenever you didn't care about it. However, it was never > really very helpful for read only kernel memory. read-only > When CR4.CET=1 and IA32_S_CET.SH_STK_EN=1, some instructions can write to > such supervisor memory. The kernel does not set IA32_S_CET.SH_STK_EN, so > avoiding kernel Write=0,Dirty=1 memory is not strictly needed for any > functional reason. But having Write=0,Dirty=1 kernel memory doesn't have > any functional benefit either, so to reduce ambiguity between shadow stack > and regular Write=0 pages, removed Dirty=1 from any kernel Write=0 PTEs. s/removed/remove/ -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette