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 lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BCC91C3DA7F for ; Wed, 7 Aug 2024 22:29:31 +0000 (UTC) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=linutronix.de header.i=@linutronix.de header.a=rsa-sha256 header.s=2020 header.b=3ZxdDYBh; dkim=fail reason="signature verification failed" header.d=linutronix.de header.i=@linutronix.de header.a=ed25519-sha256 header.s=2020e header.b=VmoamQMO; dkim-atps=neutral Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4WfPx62zM8z3cR3 for ; Thu, 8 Aug 2024 08:29:30 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=linutronix.de header.i=@linutronix.de header.a=rsa-sha256 header.s=2020 header.b=3ZxdDYBh; dkim=pass header.d=linutronix.de header.i=@linutronix.de header.a=ed25519-sha256 header.s=2020e header.b=VmoamQMO; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=linutronix.de (client-ip=2a0a:51c0:0:12e:550::1; helo=galois.linutronix.de; envelope-from=tglx@linutronix.de; receiver=lists.ozlabs.org) Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4WfPwL0gMbz2yvk for ; Thu, 8 Aug 2024 08:28:50 +1000 (AEST) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1723069727; 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: in-reply-to:in-reply-to:references:references; bh=l6W13aUL7iArB1u1SHKLVFvFvnvLUQ1pwZnVA+aBUsE=; b=3ZxdDYBh9dkkHBe2taR3ntGjkle6rDPMBLXo4UhxX0U5hvgCD7ElxlpVVKzebM7m55YoYg 6IKzzdSsW1TDc9pIvZYbtMq17EoFTuLcw1atQsU7Bsl9Yw+lnCggeHfiMfyuVHDLhinNCV GkL4xmuAy8lmfTKAidBHshnaxOnMmkK7vcvn/I5wTIvG/bMAOekzFsjwDQtCOo5gjYb9Mh 3KjeJhRTZmnhVGLmBNpWTdiMxBXZNjdkdyW9PbyWAh2qSub1H21tOY/VlFOBZky3I79b+M kKAWkAEexeyKsLLvMcde8oZ+cKCdvPGfvph2jGxkNDnZ9tv62FmQT5a2EO1IWw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1723069727; 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: in-reply-to:in-reply-to:references:references; bh=l6W13aUL7iArB1u1SHKLVFvFvnvLUQ1pwZnVA+aBUsE=; b=VmoamQMOr4JMUHfQGwGo1xKYxHHMAQiHW/JDSB/7JHvkAeXPux0Xok96bTkMYXb7wubsH8 cukq0GYxhuQaqOAQ== To: Peter Xu , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH v4 5/7] mm/x86: arch_check_zapped_pud() In-Reply-To: <20240807194812.819412-6-peterx@redhat.com> References: <20240807194812.819412-1-peterx@redhat.com> <20240807194812.819412-6-peterx@redhat.com> Date: Thu, 08 Aug 2024 00:28:47 +0200 Message-ID: <878qx80xy8.ffs@tglx> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: James Houghton , David Hildenbrand , Dave Hansen , peterx@redhat.com, Christophe Leroy , Dave Jiang , "Aneesh Kumar K . V" , x86@kernel.org, Hugh Dickins , Matthew Wilcox , Ingo Molnar , Huang Ying , Rik van Riel , Nicholas Piggin , Borislav Petkov , "Kirill A . Shutemov" , Dan Williams , Vlastimil Babka , Oscar Salvador , linuxppc-dev@lists.ozlabs.org, Andrew Morton , Rick P Edgecombe , Mel Gorman Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Wed, Aug 07 2024 at 15:48, Peter Xu wrote: > Subject: mm/x86: arch_check_zapped_pud() Is not a proper subject line. It clearly lacks a verb. Subject: mm/x86: Implement arch_check_zapped_pud() > Introduce arch_check_zapped_pud() to sanity check shadow stack on PUD zaps. > It has the same logic of the PMD helper. s/of/as/ > + > +void arch_check_zapped_pud(struct vm_area_struct *vma, pud_t pud) > +{ > + /* See note in arch_check_zapped_pte() */ > + VM_WARN_ON_ONCE(!(vma->vm_flags & VM_SHADOW_STACK) && > + pud_shstk(pud)); Please get rid of the line break. You have 100 characters. > +} > diff --git a/include/linux/pgtable.h b/include/linux/pgtable.h > index 2a6a3cccfc36..2289e9f7aa1b 100644 > --- a/include/linux/pgtable.h > +++ b/include/linux/pgtable.h > @@ -447,6 +447,13 @@ static inline void arch_check_zapped_pmd(struct vm_area_struct *vma, > } > #endif > > +#ifndef arch_check_zapped_pud > +static inline void arch_check_zapped_pud(struct vm_area_struct *vma, > + pud_t pud) > +{ Ditto.. > diff --git a/mm/huge_memory.c b/mm/huge_memory.c > index 0024266dea0a..81c5da0708ed 100644 > --- a/mm/huge_memory.c > +++ b/mm/huge_memory.c Why is a mm change burried in a patch which is named mm/x86? It's clearly documented that core changes with the generic fallback come in one patch and the architecture override in a separate one afterwards. Do we write documentation just for the sake of writing it? Thanks, tglx