From: sashiko-bot@kernel.org
To: "Alexander Gordeev" <agordeev@linux.ibm.com>
Cc: "Heiko Carstens" <hca@linux.ibm.com>,
linux-s390@vger.kernel.org, "Vasily Gorbik" <gor@linux.ibm.com>,
"Alexander Gordeev" <agordeev@linux.ibm.com>
Subject: Re: [RFC PATCH 2/4] mm: introduce ptep_get_nopgtable() and set_pte_nopgtable() accessors
Date: Fri, 17 Jul 2026 14:10:50 +0000 [thread overview]
Message-ID: <20260717141051.0FA171F000E9@smtp.kernel.org> (raw)
In-Reply-To: <19627b802d38510a6e006ec666d3177278ad8a38.1784292223.git.agordeev@linux.ibm.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Compilation breakage due to missing include for `PageTable` in `<linux/pgtable.h>`.
--
--- Patch [2]: [RFC PATCH 2/4] mm: introduce ptep_get_nopgtable() and set_pte_nopgtable() accessors ---
commit 678225e92a04ea7f858c641009b79bba768aafec
Author: Alexander Gordeev <agordeev@linux.ibm.com>
mm: introduce ptep_get_nopgtable() and set_pte_nopgtable() accessors
This patch adds helpers to safely access PTE values stored outside page
tables, such as in stack variables. It updates folio_pte_batch_flags()
and write_protect_page() to use the new accessors.
> diff --git a/include/linux/pgtable.h b/include/linux/pgtable.h
> index 8c093c119e5a8..a359e80400986 100644
> --- a/include/linux/pgtable.h
> +++ b/include/linux/pgtable.h
> @@ -489,6 +489,31 @@ static inline int pudp_set_access_flags(struct vm_area_struct *vma,
> #endif /* CONFIG_TRANSPARENT_HUGEPAGE */
> #endif
>
> +#ifndef ptep_get_nopgtable
> +static inline pte_t ptep_get_nopgtable(pte_t *ptep)
> +{
> + /*
> + * Ensure this is a pointer to a copy not a pointer into a page table.
> + * If this is a stack value, it won't be a valid virtual address, but
> + * that's fine because it also cannot be pointing into the page table.
> + */
> + VM_WARN_ON(virt_addr_valid(ptep) && PageTable(virt_to_page(ptep)));
[Severity: Low]
Does include/linux/pgtable.h need to include <linux/page-flags.h> for the
PageTable() macro?
If a translation unit includes <linux/pgtable.h> without previously including
<linux/page-flags.h>, it looks like the compiler will emit an implicit
function declaration error for PageTable() used here and in
set_pte_nopgtable().
[ ... ]
--
Sashiko AI review · https://sashiko.dev/#/patchset/cover.1784292223.git.agordeev@linux.ibm.com?part=2
next prev parent reply other threads:[~2026-07-17 14:10 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-17 13:32 [RFC PATCH 0/4] mm: introduce __ptent sparse attribute Alexander Gordeev
2026-07-17 13:32 ` [RFC PATCH 1/4] mm: use proper PTE accessors in madvise() and mremap() Alexander Gordeev
2026-07-17 13:53 ` sashiko-bot
2026-07-17 17:14 ` Kevin Brodsky
2026-07-17 13:32 ` [RFC PATCH 2/4] mm: introduce ptep_get_nopgtable() and set_pte_nopgtable() accessors Alexander Gordeev
2026-07-17 14:10 ` sashiko-bot [this message]
2026-07-17 13:32 ` [RFC PATCH 3/4] mm: introduce __ptent sparse attribute Alexander Gordeev
2026-07-17 13:32 ` [RFC PATCH 4/4] s390/mm: implement __ptent-aware pte_t type Alexander Gordeev
2026-07-17 13:39 ` sashiko-bot
2026-07-17 14:53 ` [RFC PATCH 0/4] mm: introduce __ptent sparse attribute David Hildenbrand (Arm)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260717141051.0FA171F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=agordeev@linux.ibm.com \
--cc=gor@linux.ibm.com \
--cc=hca@linux.ibm.com \
--cc=linux-s390@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox