From: kernel test robot <lkp@intel.com>
To: Chunyan Zhang <zhangchunyan@iscas.ac.cn>,
linux-riscv@lists.infradead.org, linux-mm@kvack.org,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: oe-kbuild-all@lists.linux.dev,
Paul Walmsley <paul.walmsley@sifive.com>,
Palmer Dabbelt <palmer@dabbelt.com>,
Albert Ou <aou@eecs.berkeley.edu>,
Alexandre Ghiti <alex@ghiti.fr>,
Andrew Morton <akpm@linux-foundation.org>,
Linux Memory Management List <linux-mm@kvack.org>,
Deepak Gupta <debug@rivosinc.com>,
Ved Shanbhogue <ved@rivosinc.com>, Peter Xu <peterx@redhat.com>,
Alexander Viro <viro@zeniv.linux.org.uk>,
Christian Brauner <brauner@kernel.org>,
Arnd Bergmann <arnd@arndb.de>, Jan Kara <jack@suse.cz>,
Axel Rasmussen <axelrasmussen@google.com>,
Wei Xu <weixugc@google.com>, David Hildenbrand <david@redhat.com>,
Chunyan Zhang <zhang.lyra@gmail.com>
Subject: Re: [PATCH v9 2/5] mm: uffd_wp: Add pte_uffd_wp_available()
Date: Sat, 6 Sep 2025 21:31:09 +0800 [thread overview]
Message-ID: <202509062145.1ipU0q7y-lkp@intel.com> (raw)
In-Reply-To: <20250905103651.489197-3-zhangchunyan@iscas.ac.cn>
Hi Chunyan,
kernel test robot noticed the following build errors:
[auto build test ERROR on brauner-vfs/vfs.all]
[also build test ERROR on linus/master v6.17-rc4]
[cannot apply to akpm-mm/mm-everything arnd-asm-generic/master next-20250905]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Chunyan-Zhang/mm-softdirty-Add-pte_soft_dirty_available/20250905-184138
base: https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git vfs.all
patch link: https://lore.kernel.org/r/20250905103651.489197-3-zhangchunyan%40iscas.ac.cn
patch subject: [PATCH v9 2/5] mm: uffd_wp: Add pte_uffd_wp_available()
config: m68k-allnoconfig (https://download.01.org/0day-ci/archive/20250906/202509062145.1ipU0q7y-lkp@intel.com/config)
compiler: m68k-linux-gcc (GCC) 15.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250906/202509062145.1ipU0q7y-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202509062145.1ipU0q7y-lkp@intel.com/
All errors (new ones prefixed by >>):
In file included from fs/../mm/internal.h:13,
from fs/exec.c:82:
include/linux/mm_inline.h: In function 'pte_install_uffd_wp_if_needed':
>> include/linux/mm_inline.h:573:56: error: implicit declaration of function 'pte_uffd_wp_available'; did you mean 'pte_soft_dirty_available'? [-Wimplicit-function-declaration]
573 | if (!IS_ENABLED(CONFIG_PTE_MARKER_UFFD_WP) || !pte_uffd_wp_available())
| ^~~~~~~~~~~~~~~~~~~~~
| pte_soft_dirty_available
In file included from include/asm-generic/bug.h:7,
from arch/m68k/include/asm/bug.h:32,
from include/linux/bug.h:5,
from include/linux/thread_info.h:13,
from include/asm-generic/preempt.h:5,
from ./arch/m68k/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:79,
from include/linux/spinlock.h:56,
from include/linux/mmzone.h:8,
from include/linux/gfp.h:7,
from include/linux/slab.h:16,
from fs/exec.c:27:
>> include/linux/mm_inline.h:579:23: error: implicit declaration of function 'pte_none'; did you mean 'p4d_none'? [-Wimplicit-function-declaration]
579 | WARN_ON_ONCE(!pte_none(ptep_get(pte)));
| ^~~~~~~~
include/linux/once_lite.h:28:41: note: in definition of macro 'DO_ONCE_LITE_IF'
28 | bool __ret_do_once = !!(condition); \
| ^~~~~~~~~
include/linux/mm_inline.h:579:9: note: in expansion of macro 'WARN_ON_ONCE'
579 | WARN_ON_ONCE(!pte_none(ptep_get(pte)));
| ^~~~~~~~~~~~
>> include/linux/mm_inline.h:579:32: error: implicit declaration of function 'ptep_get' [-Wimplicit-function-declaration]
579 | WARN_ON_ONCE(!pte_none(ptep_get(pte)));
| ^~~~~~~~
include/linux/once_lite.h:28:41: note: in definition of macro 'DO_ONCE_LITE_IF'
28 | bool __ret_do_once = !!(condition); \
| ^~~~~~~~~
include/linux/mm_inline.h:579:9: note: in expansion of macro 'WARN_ON_ONCE'
579 | WARN_ON_ONCE(!pte_none(ptep_get(pte)));
| ^~~~~~~~~~~~
In file included from include/linux/file.h:9,
from include/linux/kernel_read_file.h:5,
from fs/exec.c:26:
>> include/linux/mm_inline.h:591:22: error: implicit declaration of function 'pte_present'; did you mean 'p4d_present'? [-Wimplicit-function-declaration]
591 | if (unlikely(pte_present(pteval) && pte_uffd_wp(pteval)))
| ^~~~~~~~~~~
include/linux/compiler.h:77:45: note: in definition of macro 'unlikely'
77 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
>> include/linux/mm_inline.h:591:45: error: implicit declaration of function 'pte_uffd_wp' [-Wimplicit-function-declaration]
591 | if (unlikely(pte_present(pteval) && pte_uffd_wp(pteval)))
| ^~~~~~~~~~~
include/linux/compiler.h:77:45: note: in definition of macro 'unlikely'
77 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
>> include/linux/mm_inline.h:602:17: error: implicit declaration of function 'set_pte_at'; did you mean 'user_path_at'? [-Wimplicit-function-declaration]
602 | set_pte_at(vma->vm_mm, addr, pte,
| ^~~~~~~~~~
| user_path_at
>> include/linux/mm_inline.h:603:28: error: implicit declaration of function 'make_pte_marker' [-Wimplicit-function-declaration]
603 | make_pte_marker(PTE_MARKER_UFFD_WP));
| ^~~~~~~~~~~~~~~
>> include/linux/mm_inline.h:603:44: error: 'PTE_MARKER_UFFD_WP' undeclared (first use in this function)
603 | make_pte_marker(PTE_MARKER_UFFD_WP));
| ^~~~~~~~~~~~~~~~~~
include/linux/mm_inline.h:603:44: note: each undeclared identifier is reported only once for each function it appears in
--
In file included from fs/splice.c:27:
include/linux/mm_inline.h: In function 'pte_install_uffd_wp_if_needed':
>> include/linux/mm_inline.h:573:56: error: implicit declaration of function 'pte_uffd_wp_available'; did you mean 'pte_soft_dirty_available'? [-Wimplicit-function-declaration]
573 | if (!IS_ENABLED(CONFIG_PTE_MARKER_UFFD_WP) || !pte_uffd_wp_available())
| ^~~~~~~~~~~~~~~~~~~~~
| pte_soft_dirty_available
In file included from include/asm-generic/bug.h:7,
from arch/m68k/include/asm/bug.h:32,
from include/linux/bug.h:5,
from include/linux/vfsdebug.h:5,
from include/linux/fs.h:5,
from include/linux/highmem.h:5,
from include/linux/bvec.h:10,
from fs/splice.c:21:
>> include/linux/mm_inline.h:579:23: error: implicit declaration of function 'pte_none'; did you mean 'p4d_none'? [-Wimplicit-function-declaration]
579 | WARN_ON_ONCE(!pte_none(ptep_get(pte)));
| ^~~~~~~~
include/linux/once_lite.h:28:41: note: in definition of macro 'DO_ONCE_LITE_IF'
28 | bool __ret_do_once = !!(condition); \
| ^~~~~~~~~
include/linux/mm_inline.h:579:9: note: in expansion of macro 'WARN_ON_ONCE'
579 | WARN_ON_ONCE(!pte_none(ptep_get(pte)));
| ^~~~~~~~~~~~
>> include/linux/mm_inline.h:579:32: error: implicit declaration of function 'ptep_get' [-Wimplicit-function-declaration]
579 | WARN_ON_ONCE(!pte_none(ptep_get(pte)));
| ^~~~~~~~
include/linux/once_lite.h:28:41: note: in definition of macro 'DO_ONCE_LITE_IF'
28 | bool __ret_do_once = !!(condition); \
| ^~~~~~~~~
include/linux/mm_inline.h:579:9: note: in expansion of macro 'WARN_ON_ONCE'
579 | WARN_ON_ONCE(!pte_none(ptep_get(pte)));
| ^~~~~~~~~~~~
In file included from include/asm-generic/bug.h:5:
>> include/linux/mm_inline.h:591:22: error: implicit declaration of function 'pte_present'; did you mean 'p4d_present'? [-Wimplicit-function-declaration]
591 | if (unlikely(pte_present(pteval) && pte_uffd_wp(pteval)))
| ^~~~~~~~~~~
include/linux/compiler.h:77:45: note: in definition of macro 'unlikely'
77 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
>> include/linux/mm_inline.h:591:45: error: implicit declaration of function 'pte_uffd_wp' [-Wimplicit-function-declaration]
591 | if (unlikely(pte_present(pteval) && pte_uffd_wp(pteval)))
| ^~~~~~~~~~~
include/linux/compiler.h:77:45: note: in definition of macro 'unlikely'
77 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
include/linux/mm_inline.h:602:17: error: implicit declaration of function 'set_pte_at' [-Wimplicit-function-declaration]
602 | set_pte_at(vma->vm_mm, addr, pte,
| ^~~~~~~~~~
>> include/linux/mm_inline.h:603:28: error: implicit declaration of function 'make_pte_marker' [-Wimplicit-function-declaration]
603 | make_pte_marker(PTE_MARKER_UFFD_WP));
| ^~~~~~~~~~~~~~~
>> include/linux/mm_inline.h:603:44: error: 'PTE_MARKER_UFFD_WP' undeclared (first use in this function)
603 | make_pte_marker(PTE_MARKER_UFFD_WP));
| ^~~~~~~~~~~~~~~~~~
include/linux/mm_inline.h:603:44: note: each undeclared identifier is reported only once for each function it appears in
vim +573 include/linux/mm_inline.h
556
557 /*
558 * If this pte is wr-protected by uffd-wp in any form, arm the special pte to
559 * replace a none pte. NOTE! This should only be called when *pte is already
560 * cleared so we will never accidentally replace something valuable. Meanwhile
561 * none pte also means we are not demoting the pte so tlb flushed is not needed.
562 * E.g., when pte cleared the caller should have taken care of the tlb flush.
563 *
564 * Must be called with pgtable lock held so that no thread will see the none
565 * pte, and if they see it, they'll fault and serialize at the pgtable lock.
566 *
567 * Returns true if an uffd-wp pte was installed, false otherwise.
568 */
569 static inline bool
570 pte_install_uffd_wp_if_needed(struct vm_area_struct *vma, unsigned long addr,
571 pte_t *pte, pte_t pteval)
572 {
> 573 if (!IS_ENABLED(CONFIG_PTE_MARKER_UFFD_WP) || !pte_uffd_wp_available())
574 return false;
575
576 bool arm_uffd_pte = false;
577
578 /* The current status of the pte should be "cleared" before calling */
> 579 WARN_ON_ONCE(!pte_none(ptep_get(pte)));
580
581 /*
582 * NOTE: userfaultfd_wp_unpopulated() doesn't need this whole
583 * thing, because when zapping either it means it's dropping the
584 * page, or in TTU where the present pte will be quickly replaced
585 * with a swap pte. There's no way of leaking the bit.
586 */
587 if (vma_is_anonymous(vma) || !userfaultfd_wp(vma))
588 return false;
589
590 /* A uffd-wp wr-protected normal pte */
> 591 if (unlikely(pte_present(pteval) && pte_uffd_wp(pteval)))
592 arm_uffd_pte = true;
593
594 /*
595 * A uffd-wp wr-protected swap pte. Note: this should even cover an
596 * existing pte marker with uffd-wp bit set.
597 */
598 if (unlikely(pte_swp_uffd_wp_any(pteval)))
599 arm_uffd_pte = true;
600
601 if (unlikely(arm_uffd_pte)) {
> 602 set_pte_at(vma->vm_mm, addr, pte,
> 603 make_pte_marker(PTE_MARKER_UFFD_WP));
604 return true;
605 }
606
607 return false;
608 }
609
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2025-09-06 13:31 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-05 10:36 [PATCH v9 0/5] riscv: mm: Add soft-dirty and uffd-wp support Chunyan Zhang
2025-09-05 10:36 ` [PATCH v9 1/5] mm: softdirty: Add pte_soft_dirty_available() Chunyan Zhang
2025-09-05 10:36 ` [PATCH v9 2/5] mm: uffd_wp: Add pte_uffd_wp_available() Chunyan Zhang
2025-09-06 13:31 ` kernel test robot [this message]
2025-09-05 10:36 ` [PATCH v9 3/5] riscv: Add RISC-V Svrsw60t59b extension support Chunyan Zhang
2025-09-05 10:36 ` [PATCH v9 4/5] riscv: mm: Add soft-dirty page tracking support Chunyan Zhang
2025-09-05 10:36 ` [PATCH v9 5/5] riscv: mm: Add uffd write-protect support Chunyan Zhang
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=202509062145.1ipU0q7y-lkp@intel.com \
--to=lkp@intel.com \
--cc=akpm@linux-foundation.org \
--cc=alex@ghiti.fr \
--cc=aou@eecs.berkeley.edu \
--cc=arnd@arndb.de \
--cc=axelrasmussen@google.com \
--cc=brauner@kernel.org \
--cc=david@redhat.com \
--cc=debug@rivosinc.com \
--cc=jack@suse.cz \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-riscv@lists.infradead.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=peterx@redhat.com \
--cc=ved@rivosinc.com \
--cc=viro@zeniv.linux.org.uk \
--cc=weixugc@google.com \
--cc=zhang.lyra@gmail.com \
--cc=zhangchunyan@iscas.ac.cn \
/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