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 A4A58C64EC4 for ; Fri, 3 Mar 2023 15:37:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231340AbjCCPhf (ORCPT ); Fri, 3 Mar 2023 10:37:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51122 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231302AbjCCPhe (ORCPT ); Fri, 3 Mar 2023 10:37:34 -0500 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5A407B444; Fri, 3 Mar 2023 07:37:31 -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 7AA891EC04CC; Fri, 3 Mar 2023 16:37:29 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1677857849; 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=IcCCEVJ5p/dYZeUl9ZMUyOCdeHoX9FqsqGWMwnIjrWs=; b=JSrUhl44xpVsGruuKI0ZMol9HtgjgILcEJRz7AWLaeUjfLEJ6DNDEfp/Yyp9Q1Ae3oH2I+ m8kj0NQQtD9prRxPWIHQLBD9C5Qi0W4lvaMIYYUpm2BQEOxGJvsDVm4JRq7naMFNxaAYsX 8Vi2X4vY7nHBg8NoFC+hdUmp7fxXAn8= Date: Fri, 3 Mar 2023 16:37:24 +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, david@redhat.com, debug@rivosinc.com Subject: Re: [PATCH v7 20/41] x86/mm: Teach pte_mkwrite() about stack memory Message-ID: References: <20230227222957.24501-1-rick.p.edgecombe@intel.com> <20230227222957.24501-21-rick.p.edgecombe@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20230227222957.24501-21-rick.p.edgecombe@intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-api@vger.kernel.org On Mon, Feb 27, 2023 at 02:29:36PM -0800, Rick Edgecombe wrote: > If a VMA has the VM_SHADOW_STACK flag, it is shadow stack memory. So > when it is made writable with pte_mkwrite(), it should create shadow > stack memory, not conventionally writable memory. Now that pte_mkwrite() > takes a VMA, and places where shadow stack memory might be created pass > one, pte_mkwrite() can know when it should do this. ^^^^ This sentence needs rewriting. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette