From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out30-110.freemail.mail.aliyun.com (out30-110.freemail.mail.aliyun.com [115.124.30.110]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A2F511547C9 for ; Fri, 24 Oct 2025 02:00:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=115.124.30.110 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761271238; cv=none; b=G7CBZSqwXfDVFCsurdYAd3S8Ffn3t1j/LU1DvL8UFXMgrqiZMyZkygOcnvBwTrCzPDwOhFN2DUesq3LozLzW4KaeXWqYO+ykc+T7z0RWLfGVMB6PKAjvxUIjM8SlcO4EO3uEeMiZ7ebFItkud6rcE82xaGCPjX644k2uCWKkZQY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761271238; c=relaxed/simple; bh=MDygD7E0EDvvNYl24YlMqIZMRV2LfeVwEaH4xUJIZv4=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=kwpoEpA4wz7mayokUSvJ1ljS5j8T0RxcAy9sdGA27U/gFCNE2kEwRXOtrGJkAv/6CbRNdlwJ6l6TqXqn6BUsmPkchdpeeYb6Sqw4c5pT1ZoPdFnemd8mibQZwNJ+ij9HRX0OD/bxi0vm8J0HbAI1Dwi1STqwH+1vq95OoWctNx4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com; spf=pass smtp.mailfrom=linux.alibaba.com; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b=djn2EYtd; arc=none smtp.client-ip=115.124.30.110 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b="djn2EYtd" DKIM-Signature:v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.alibaba.com; s=default; t=1761271226; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type; bh=L8/7AoCHvUPhdFk/Qd1hWlG/hm2n0G0zQ46sK7h9NoY=; b=djn2EYtd9gl7PrJfR0xTnvAKxvX83HmN8H4wizZMkoWRZ981eGtxZ68b86AHsDre2hkqs3G17mS4Qr+eJit/vYh+GW5tIJgGGUpONEuhgmqDxoN+JzgtmbXozazq7W9uAHEUqV6prSrzl1F5is9TIuxe7OLl2MvCwjNQqI7jlxw= Received: from DESKTOP-5N7EMDA(mailfrom:ying.huang@linux.alibaba.com fp:SMTPD_---0WqsUhQ8_1761271225 cluster:ay36) by smtp.aliyun-inc.com; Fri, 24 Oct 2025 10:00:26 +0800 From: "Huang, Ying" To: Anshuman Khandual Cc: linux-mm@kvack.org, Andrew Morton , David Hildenbrand , linux-kernel@vger.kernel.org, Catalin Marinas Subject: Re: [PATCH V3] mm/debug_vm_pgtable: Add [pte|pmd]_mkwrite_novma() tests In-Reply-To: <20251024013137.136926-1-anshuman.khandual@arm.com> (Anshuman Khandual's message of "Fri, 24 Oct 2025 02:31:37 +0100") References: <20251024013137.136926-1-anshuman.khandual@arm.com> Date: Fri, 24 Oct 2025 10:00:25 +0800 Message-ID: <87h5vpvz2e.fsf@DESKTOP-5N7EMDA> User-Agent: Gnus/5.13 (Gnus v5.13) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=ascii Anshuman Khandual writes: > Add some [pte|pmd]_mkwrite_novma() relevant tests. > > Cc: Andrew Morton > Cc: David Hildenbrand > Cc: Huang Ying > Cc: linux-mm@kvack.org > Cc: linux-kernel@vger.kernel.org > Suggested-by: Catalin Marinas > Signed-off-by: Anshuman Khandual > --- > These tests clear on arm64 platform after the following recent patch. > > https://lore.kernel.org/all/20251015023712.46598-1-ying.huang@linux.alibaba.com/ > > Changes in V3: > > - Added a new test combination per Huang > > Changes in V2: > > https://lore.kernel.org/all/20251022032951.3498553-1-anshuman.khandual@arm.com/ > > - Added a new test combination per Huang > > Changes in V1: > > https://lore.kernel.org/all/20251021024424.2390325-1-anshuman.khandual@arm.com/ > > mm/debug_vm_pgtable.c | 13 +++++++++++++ > 1 file changed, 13 insertions(+) > > diff --git a/mm/debug_vm_pgtable.c b/mm/debug_vm_pgtable.c > index 830107b6dd08..133543ca2821 100644 > --- a/mm/debug_vm_pgtable.c > +++ b/mm/debug_vm_pgtable.c > @@ -102,6 +102,12 @@ static void __init pte_basic_tests(struct pgtable_debug_args *args, int idx) > WARN_ON(pte_write(pte_wrprotect(pte_mkwrite(pte, args->vma)))); > WARN_ON(pte_dirty(pte_wrprotect(pte_mkclean(pte)))); > WARN_ON(!pte_dirty(pte_wrprotect(pte_mkdirty(pte)))); > + > + WARN_ON(!pte_dirty(pte_mkwrite_novma(pte_mkdirty(pte)))); > + WARN_ON(pte_dirty(pte_mkwrite_novma(pte_mkclean(pte)))); > + WARN_ON(!pte_write(pte_mkdirty(pte_mkwrite_novma(pte)))); > + WARN_ON(!pte_write(pte_mkwrite_novma(pte_wrprotect(pte)))); > + WARN_ON(pte_write(pte_wrprotect(pte_mkwrite_novma(pte)))); > } > > static void __init pte_advanced_tests(struct pgtable_debug_args *args) > @@ -195,6 +201,13 @@ static void __init pmd_basic_tests(struct pgtable_debug_args *args, int idx) > WARN_ON(pmd_write(pmd_wrprotect(pmd_mkwrite(pmd, args->vma)))); > WARN_ON(pmd_dirty(pmd_wrprotect(pmd_mkclean(pmd)))); > WARN_ON(!pmd_dirty(pmd_wrprotect(pmd_mkdirty(pmd)))); > + > + WARN_ON(!pmd_dirty(pmd_mkwrite_novma(pmd_mkdirty(pmd)))); > + WARN_ON(pmd_dirty(pmd_mkwrite_novma(pmd_mkclean(pmd)))); > + WARN_ON(!pmd_write(pmd_mkdirty(pmd_mkwrite_novma(pmd)))); > + WARN_ON(!pmd_write(pmd_mkwrite_novma(pmd_wrprotect(pmd)))); > + WARN_ON(pmd_write(pmd_wrprotect(pmd_mkwrite_novma(pmd)))); > + > /* > * A huge page does not point to next level page table > * entry. Hence this must qualify as pmd_bad(). LGTM, feel free to add my Reviewed-by: Huang Ying in the future versions. --- Best Regards, Huang, Ying