[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e9faaec1-0ddd-5691-7996-aff6f54ab160@arm.com>
Date: Fri, 22 Apr 2022 10:11:12 +0530
From: Anshuman Khandual <anshuman.khandual@....com>
To: Tong Tiangen <tongtiangen@...wei.com>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
Dave Hansen <dave.hansen@...ux.intel.com>, x86@...nel.org,
"H. Peter Anvin" <hpa@...or.com>,
Pasha Tatashin <pasha.tatashin@...een.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Catalin Marinas <catalin.marinas@....com>,
Will Deacon <will@...nel.org>,
Paul Walmsley <paul.walmsley@...ive.com>,
Palmer Dabbelt <palmer@...belt.com>,
Albert Ou <aou@...s.berkeley.edu>
Cc: linux-kernel@...r.kernel.org, linux-mm@...ck.org,
linux-arm-kernel@...ts.infradead.org,
linux-riscv@...ts.infradead.org,
Kefeng Wang <wangkefeng.wang@...wei.com>,
Guohanjun <guohanjun@...wei.com>
Subject: Re: [PATCH -next v5 1/5] mm: page_table_check: using PxD_SIZE instead
of PxD_PAGE_SIZE
On 4/21/22 13:50, Tong Tiangen wrote:
> Macro PUD_SIZE/PMD_SIZE is more general in various architectures. Using
> PUD_SIZE/PMD_SIZE instead of PUD_PAGE_SIZE/PMD_PAGE_SIZE can better
> support page table check in architectures other than x86 and it is no
> functional impact on x86.>
> Suggested-by: Anshuman Khandual <anshuman.khandual@....com>
> Signed-off-by: Tong Tiangen <tongtiangen@...wei.com>
There are multiple structural problems in the commit message wording
but will leave them upto Andrew, if he could fix while merging.
Otherwise LGTM
Reviewed-by: Anshuman Khandual <anshuman.khandual@....com>
> ---
> mm/page_table_check.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/mm/page_table_check.c b/mm/page_table_check.c
> index 2458281bff89..eb0d0b71cdf6 100644
> --- a/mm/page_table_check.c
> +++ b/mm/page_table_check.c
> @@ -177,7 +177,7 @@ void __page_table_check_pmd_clear(struct mm_struct *mm, unsigned long addr,
>
> if (pmd_user_accessible_page(pmd)) {
> page_table_check_clear(mm, addr, pmd_pfn(pmd),
> - PMD_PAGE_SIZE >> PAGE_SHIFT);
> + PMD_SIZE >> PAGE_SHIFT);
> }
> }
> EXPORT_SYMBOL(__page_table_check_pmd_clear);
> @@ -190,7 +190,7 @@ void __page_table_check_pud_clear(struct mm_struct *mm, unsigned long addr,
>
> if (pud_user_accessible_page(pud)) {
> page_table_check_clear(mm, addr, pud_pfn(pud),
> - PUD_PAGE_SIZE >> PAGE_SHIFT);
> + PUD_SIZE >> PAGE_SHIFT);
> }
> }
> EXPORT_SYMBOL(__page_table_check_pud_clear);
> @@ -219,7 +219,7 @@ void __page_table_check_pmd_set(struct mm_struct *mm, unsigned long addr,
> __page_table_check_pmd_clear(mm, addr, *pmdp);
> if (pmd_user_accessible_page(pmd)) {
> page_table_check_set(mm, addr, pmd_pfn(pmd),
> - PMD_PAGE_SIZE >> PAGE_SHIFT,
> + PMD_SIZE >> PAGE_SHIFT,
> pmd_write(pmd));
> }
> }
> @@ -234,7 +234,7 @@ void __page_table_check_pud_set(struct mm_struct *mm, unsigned long addr,
> __page_table_check_pud_clear(mm, addr, *pudp);
> if (pud_user_accessible_page(pud)) {
> page_table_check_set(mm, addr, pud_pfn(pud),
> - PUD_PAGE_SIZE >> PAGE_SHIFT,
> + PUD_SIZE >> PAGE_SHIFT,
> pud_write(pud));
> }
> }
Powered by blists - more mailing lists