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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 741AECA1002 for ; Sat, 6 Sep 2025 13:32:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=niYThJwpRGZdmQFkPtNOUkKtmuH9sdVDliUZNCtSx/E=; b=XrAOrqb4lC3zYV pWmRlJvOEHh1+hi76tkkYxUismSpQEM/GEmKWkevdoHGttC1riZ7YvISCUTWFYFIbs6jWU8ojG6Lm LHRZcdLq56qKneAVgt/s8UtnkM1NWA5tdTAXcsVm6ZtEaAhP4BnXmV6Zx6GH3VSXY9lwjnTnLQP28 PrNRie7PRyuHab7j5G79hkoCg9jj/kPmlYeSOHpBtiNuA/HJIcpLpIghU7gTSUJ0b9WA+DpdAGSZJ OkMgW2sBcTh5hVMGknOavH/OGqxB5qgFS3GvL2DTANnjxqIX2Lw51dpy9DBztn7T8oyHuk5ZkyA0Z fVeeRgYM7FRkDJqmzfgw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1uut1F-00000007pCc-3qNS; Sat, 06 Sep 2025 13:31:53 +0000 Received: from mgamail.intel.com ([198.175.65.9]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1uut1C-00000007pCG-2yoO for linux-riscv@lists.infradead.org; Sat, 06 Sep 2025 13:31:52 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1757165511; x=1788701511; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=JxpVAPprCj1/cOsB/r2kwrJ/LKeJT1ayD6hStYXR2fA=; b=k9K9PS3mmZYjb16ABBMjudsDLxuSoOcIYkq7/5QlDGSlYR27aoZkcMQ7 VE6t21Tff2ZrqN4fyTOikPsl8sz9KaW/3hYyGKFgC6t707fVGF+/VgIMb c+yymnyLT3jQp4HP6rT4+evHixX1O2P5XTTHDEtdDeVUDl8fU6rJU16uF 2SeXKtLN4BeOyBBmKXJbCAKe7EaanF2NgB6LaJG93jXiESfq8e8GAD8fl PrvkmmmYD0nUMQ+MuuKFN9CdNkX2NHn4BL2dPr+9FeWAi/pMJGCODQjTq oVeTaZx2EOUPQMewsKyJuLf+DbxLNzcF6fHDahEzR3fOOpG0dPxb/6fqB w==; X-CSE-ConnectionGUID: kgHo6syZQ+COesYVqw+z9A== X-CSE-MsgGUID: 3hKQjF3TQ9GjUFEuc+LcAQ== X-IronPort-AV: E=McAfee;i="6800,10657,11531"; a="82083288" X-IronPort-AV: E=Sophos;i="6.17,312,1747724400"; d="scan'208";a="82083288" Received: from fmviesa005.fm.intel.com ([10.60.135.145]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Sep 2025 06:31:48 -0700 X-CSE-ConnectionGUID: 3JrKiGFBTfW5BencZrBXMw== X-CSE-MsgGUID: 9JDGkvDmT02J1DrNzFJAng== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.18,244,1751266800"; d="scan'208";a="176730549" Received: from lkp-server01.sh.intel.com (HELO 114d98da2b6c) ([10.239.97.150]) by fmviesa005.fm.intel.com with ESMTP; 06 Sep 2025 06:31:42 -0700 Received: from kbuild by 114d98da2b6c with local (Exim 4.96) (envelope-from ) id 1uut12-0001VP-0c; Sat, 06 Sep 2025 13:31:40 +0000 Date: Sat, 6 Sep 2025 21:31:09 +0800 From: kernel test robot To: Chunyan Zhang , 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 , Palmer Dabbelt , Albert Ou , Alexandre Ghiti , Andrew Morton , Linux Memory Management List , Deepak Gupta , Ved Shanbhogue , Peter Xu , Alexander Viro , Christian Brauner , Arnd Bergmann , Jan Kara , Axel Rasmussen , Wei Xu , David Hildenbrand , Chunyan Zhang Subject: Re: [PATCH v9 2/5] mm: uffd_wp: Add pte_uffd_wp_available() Message-ID: <202509062145.1ipU0q7y-lkp@intel.com> References: <20250905103651.489197-3-zhangchunyan@iscas.ac.cn> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20250905103651.489197-3-zhangchunyan@iscas.ac.cn> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250906_063150_842935_D57B034E X-CRM114-Status: GOOD ( 19.35 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org 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 | 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 _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv