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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id B300CC43334 for ; Sat, 25 Jun 2022 13:20:16 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id CEB8C8E02A7; Sat, 25 Jun 2022 09:20:15 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C9AAA8E029A; Sat, 25 Jun 2022 09:20:15 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B62648E02A7; Sat, 25 Jun 2022 09:20:15 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id A61488E029A for ; Sat, 25 Jun 2022 09:20:15 -0400 (EDT) Received: from smtpin21.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 6E57934B4C for ; Sat, 25 Jun 2022 13:20:15 +0000 (UTC) X-FDA: 79616816790.21.B8F2466 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by imf22.hostedemail.com (Postfix) with ESMTP id 4D57EC0021 for ; Sat, 25 Jun 2022 13:20:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1656163214; x=1687699214; h=date:from:to:cc:subject:message-id:mime-version; bh=E+g1LfATPd0ZspZntzH4NSUypF/JsTen+sy1/xUT8wk=; b=HSo+CUYfqru51p0oWN5HC7bLzj1q/ws3+FLcA/om2on0HBnnpK7jf6ab uw++2R+kGZ3EgNUIZLqMIHSE04A1Lo85BWio2gxhjGgtZgQ+w7C8LpcA+ IaXAMc/ZrircSoGruhbzMhbPtFWh9WSFibQc1oiU8GLGf7Sd12PfAzpa3 dMDKOZjSav7DJSfinVJHQoyVGzWSWseY/ip08iKEl/QIUO217jySCo9xP zYnkFZ7/B0NyxtozNGbbL+GQbtnFuqW//j4/5n9BJxIvQHK8vAJlFEP58 bbtiaLQVmM7TD5VJNe7SWsBnZeaBjSwKGaQ3gdv7wScifx/cWQiGYoUYh w==; X-IronPort-AV: E=McAfee;i="6400,9594,10388"; a="306652925" X-IronPort-AV: E=Sophos;i="5.92,222,1650956400"; d="scan'208";a="306652925" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Jun 2022 06:20:11 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.92,222,1650956400"; d="scan'208";a="716521170" Received: from lkp-server01.sh.intel.com (HELO 68b931ab7ac1) ([10.239.97.150]) by orsmga004.jf.intel.com with ESMTP; 25 Jun 2022 06:20:08 -0700 Received: from kbuild by 68b931ab7ac1 with local (Exim 4.95) (envelope-from ) id 1o55hn-0005ml-Vy; Sat, 25 Jun 2022 13:20:07 +0000 Date: Sat, 25 Jun 2022 21:19:30 +0800 From: kernel test robot To: Tong Tiangen Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org, linux-kernel@vger.kernel.org, Andrew Morton , Linux Memory Management List , Pasha Tatashin Subject: mm/page_table_check.c:148:6: error: call to undeclared function 'pte_user_accessible_page'; ISO C99 and later do not support implicit function declarations Message-ID: <202206252135.7VbdJEIx-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline ARC-Authentication-Results: i=1; imf22.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=HSo+CUYf; spf=none (imf22.hostedemail.com: domain of lkp@intel.com has no SPF policy when checking 192.55.52.88) smtp.mailfrom=lkp@intel.com; dmarc=pass (policy=none) header.from=intel.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1656163215; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding:in-reply-to: references:dkim-signature; bh=25Ze+jGlfHDlMCrLNSBYlbfbJVSRS7J0EprrbndIXHk=; b=f5p8W9a3UpnJPstFAF9TNzqSwBqh4xgr4XMGcH6kjrWQYpvNEDBCtBJfdVkVTbuVUGAYho w50rMa+NmoFJcdyfQ2Cv/QdUYrFsqEntmFkTjcswanDAXZwNlsVbZ93V5WhxxcoHPB+Kjg BH5A+2eMTWN6/qkTH7AT1sf8lLg0QT4= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1656163215; a=rsa-sha256; cv=none; b=r6KeBZvlXg4a8rf4Iu96pwx+OeVkLx2winwwLuC5lF0Fw44PgelXsLmRshvhNbttnrJEBI 9SoWjxS0Lo5wgr352GCMh/RLzR6TeXvFo/YMWr9IJzTlqIMyQ9cLEJZpQVCX0qkWcs3RJT iqVuNQtg2L68qG9XbP4oSFpW29K3r4o= X-Stat-Signature: tn1ap7zosj8mz9cijogjac76di3tjd3o X-Rspamd-Queue-Id: 4D57EC0021 X-Rspam-User: Authentication-Results: imf22.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=HSo+CUYf; spf=none (imf22.hostedemail.com: domain of lkp@intel.com has no SPF policy when checking 192.55.52.88) smtp.mailfrom=lkp@intel.com; dmarc=pass (policy=none) header.from=intel.com X-Rspamd-Server: rspam02 X-HE-Tag: 1656163214-232801 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Hi Tong, FYI, the error/warning still remains. tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 8c23f235a6a8ae43abea215812eb9d8cf4dd165e commit: 3fee229a8eb936b96933c6b2cd02d2e87a4cc997 riscv/mm: enable ARCH_SUPPORTS_PAGE_TABLE_CHECK date: 6 weeks ago config: riscv-randconfig-r003-20220625 compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 42a7ddb428c999229491b0effbb1a4059149fba8) reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # install riscv cross compiling tool for clang build # apt-get install binutils-riscv64-linux-gnu # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=3fee229a8eb936b96933c6b2cd02d2e87a4cc997 git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git git fetch --no-tags linus master git checkout 3fee229a8eb936b96933c6b2cd02d2e87a4cc997 # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=riscv SHELL=/bin/bash If you fix the issue, kindly add following tag where applicable Reported-by: kernel test robot All errors (new ones prefixed by >>): >> mm/page_table_check.c:148:6: error: call to undeclared function 'pte_user_accessible_page'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] if (pte_user_accessible_page(pte)) { ^ >> mm/page_table_check.c:149:36: error: call to undeclared function 'pte_pfn'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] page_table_check_clear(mm, addr, pte_pfn(pte), ^ >> mm/page_table_check.c:161:6: error: call to undeclared function 'pmd_user_accessible_page'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] if (pmd_user_accessible_page(pmd)) { ^ >> mm/page_table_check.c:162:36: error: call to undeclared function 'pmd_pfn'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] page_table_check_clear(mm, addr, pmd_pfn(pmd), ^ mm/page_table_check.c:162:36: note: did you mean '_pmd_pfn'? arch/riscv/include/asm/pgtable-64.h:144:29: note: '_pmd_pfn' declared here static inline unsigned long _pmd_pfn(pmd_t pmd) ^ >> mm/page_table_check.c:174:6: error: call to undeclared function 'pud_user_accessible_page'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] if (pud_user_accessible_page(pud)) { ^ >> mm/page_table_check.c:175:36: error: call to undeclared function 'pud_pfn'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] page_table_check_clear(mm, addr, pud_pfn(pud), ^ mm/page_table_check.c:175:36: note: did you mean '_pud_pfn'? arch/riscv/include/asm/pgtable-64.h:104:29: note: '_pud_pfn' declared here static inline unsigned long _pud_pfn(pud_t pud) ^ mm/page_table_check.c:188:6: error: call to undeclared function 'pte_user_accessible_page'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] if (pte_user_accessible_page(pte)) { ^ mm/page_table_check.c:189:34: error: call to undeclared function 'pte_pfn'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] page_table_check_set(mm, addr, pte_pfn(pte), ^ >> mm/page_table_check.c:191:10: error: call to undeclared function 'pte_write'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] pte_write(pte)); ^ mm/page_table_check.c:203:6: error: call to undeclared function 'pmd_user_accessible_page'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] if (pmd_user_accessible_page(pmd)) { ^ mm/page_table_check.c:204:34: error: call to undeclared function 'pmd_pfn'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] page_table_check_set(mm, addr, pmd_pfn(pmd), ^ >> mm/page_table_check.c:206:10: error: call to undeclared function 'pmd_write'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] pmd_write(pmd)); ^ mm/page_table_check.c:218:6: error: call to undeclared function 'pud_user_accessible_page'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] if (pud_user_accessible_page(pud)) { ^ mm/page_table_check.c:219:34: error: call to undeclared function 'pud_pfn'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] page_table_check_set(mm, addr, pud_pfn(pud), ^ >> mm/page_table_check.c:221:10: error: call to undeclared function 'pud_write'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] pud_write(pud)); ^ mm/page_table_check.c:221:10: note: did you mean 'up_write'? include/linux/rwsem.h:202:13: note: 'up_write' declared here extern void up_write(struct rw_semaphore *sem); ^ >> mm/page_table_check.c:233:7: error: call to undeclared function 'pmd_bad'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] if (!pmd_bad(pmd) && !pmd_leaf(pmd)) { ^ >> mm/page_table_check.c:234:17: error: call to undeclared function 'pte_offset_map'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] pte_t *ptep = pte_offset_map(&pmd, addr); ^ mm/page_table_check.c:234:10: warning: incompatible integer to pointer conversion initializing 'pte_t *' with an expression of type 'int' [-Wint-conversion] pte_t *ptep = pte_offset_map(&pmd, addr); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~ >> mm/page_table_check.c:237:3: error: call to undeclared function 'pte_unmap'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] pte_unmap(ptep); ^ mm/page_table_check.c:237:3: note: did you mean 'pte_devmap'? include/linux/mm.h:2113:19: note: 'pte_devmap' declared here static inline int pte_devmap(pte_t pte) ^ >> mm/page_table_check.c:238:19: error: use of undeclared identifier 'PTRS_PER_PTE' for (i = 0; i < PTRS_PER_PTE; i++) { ^ 1 warning and 19 errors generated. Kconfig warnings: (for reference only) WARNING: unmet direct dependencies detected for DRM_TTM Depends on HAS_IOMEM && DRM && MMU Selected by - DRM_TTM_HELPER && HAS_IOMEM && DRM - DRM_HISI_HIBMC && HAS_IOMEM && DRM && PCI && (ARM64 || COMPILE_TEST vim +/pte_user_accessible_page +148 mm/page_table_check.c df4e817b710809 Pasha Tatashin 2022-01-14 141 df4e817b710809 Pasha Tatashin 2022-01-14 142 void __page_table_check_pte_clear(struct mm_struct *mm, unsigned long addr, df4e817b710809 Pasha Tatashin 2022-01-14 143 pte_t pte) df4e817b710809 Pasha Tatashin 2022-01-14 144 { df4e817b710809 Pasha Tatashin 2022-01-14 145 if (&init_mm == mm) df4e817b710809 Pasha Tatashin 2022-01-14 146 return; df4e817b710809 Pasha Tatashin 2022-01-14 147 df4e817b710809 Pasha Tatashin 2022-01-14 @148 if (pte_user_accessible_page(pte)) { df4e817b710809 Pasha Tatashin 2022-01-14 @149 page_table_check_clear(mm, addr, pte_pfn(pte), df4e817b710809 Pasha Tatashin 2022-01-14 150 PAGE_SIZE >> PAGE_SHIFT); df4e817b710809 Pasha Tatashin 2022-01-14 151 } df4e817b710809 Pasha Tatashin 2022-01-14 152 } df4e817b710809 Pasha Tatashin 2022-01-14 153 EXPORT_SYMBOL(__page_table_check_pte_clear); df4e817b710809 Pasha Tatashin 2022-01-14 154 df4e817b710809 Pasha Tatashin 2022-01-14 155 void __page_table_check_pmd_clear(struct mm_struct *mm, unsigned long addr, df4e817b710809 Pasha Tatashin 2022-01-14 156 pmd_t pmd) df4e817b710809 Pasha Tatashin 2022-01-14 157 { df4e817b710809 Pasha Tatashin 2022-01-14 158 if (&init_mm == mm) df4e817b710809 Pasha Tatashin 2022-01-14 159 return; df4e817b710809 Pasha Tatashin 2022-01-14 160 df4e817b710809 Pasha Tatashin 2022-01-14 @161 if (pmd_user_accessible_page(pmd)) { df4e817b710809 Pasha Tatashin 2022-01-14 @162 page_table_check_clear(mm, addr, pmd_pfn(pmd), 92fb05242a1b1e Tong Tiangen 2022-05-12 163 PMD_SIZE >> PAGE_SHIFT); df4e817b710809 Pasha Tatashin 2022-01-14 164 } df4e817b710809 Pasha Tatashin 2022-01-14 165 } df4e817b710809 Pasha Tatashin 2022-01-14 166 EXPORT_SYMBOL(__page_table_check_pmd_clear); df4e817b710809 Pasha Tatashin 2022-01-14 167 df4e817b710809 Pasha Tatashin 2022-01-14 168 void __page_table_check_pud_clear(struct mm_struct *mm, unsigned long addr, df4e817b710809 Pasha Tatashin 2022-01-14 169 pud_t pud) df4e817b710809 Pasha Tatashin 2022-01-14 170 { df4e817b710809 Pasha Tatashin 2022-01-14 171 if (&init_mm == mm) df4e817b710809 Pasha Tatashin 2022-01-14 172 return; df4e817b710809 Pasha Tatashin 2022-01-14 173 df4e817b710809 Pasha Tatashin 2022-01-14 @174 if (pud_user_accessible_page(pud)) { df4e817b710809 Pasha Tatashin 2022-01-14 @175 page_table_check_clear(mm, addr, pud_pfn(pud), 92fb05242a1b1e Tong Tiangen 2022-05-12 176 PUD_SIZE >> PAGE_SHIFT); df4e817b710809 Pasha Tatashin 2022-01-14 177 } df4e817b710809 Pasha Tatashin 2022-01-14 178 } df4e817b710809 Pasha Tatashin 2022-01-14 179 EXPORT_SYMBOL(__page_table_check_pud_clear); df4e817b710809 Pasha Tatashin 2022-01-14 180 df4e817b710809 Pasha Tatashin 2022-01-14 181 void __page_table_check_pte_set(struct mm_struct *mm, unsigned long addr, df4e817b710809 Pasha Tatashin 2022-01-14 182 pte_t *ptep, pte_t pte) df4e817b710809 Pasha Tatashin 2022-01-14 183 { df4e817b710809 Pasha Tatashin 2022-01-14 184 if (&init_mm == mm) df4e817b710809 Pasha Tatashin 2022-01-14 185 return; df4e817b710809 Pasha Tatashin 2022-01-14 186 64d8b9e14512ce Pasha Tatashin 2022-02-03 187 __page_table_check_pte_clear(mm, addr, *ptep); df4e817b710809 Pasha Tatashin 2022-01-14 188 if (pte_user_accessible_page(pte)) { df4e817b710809 Pasha Tatashin 2022-01-14 189 page_table_check_set(mm, addr, pte_pfn(pte), df4e817b710809 Pasha Tatashin 2022-01-14 190 PAGE_SIZE >> PAGE_SHIFT, df4e817b710809 Pasha Tatashin 2022-01-14 @191 pte_write(pte)); df4e817b710809 Pasha Tatashin 2022-01-14 192 } df4e817b710809 Pasha Tatashin 2022-01-14 193 } df4e817b710809 Pasha Tatashin 2022-01-14 194 EXPORT_SYMBOL(__page_table_check_pte_set); df4e817b710809 Pasha Tatashin 2022-01-14 195 df4e817b710809 Pasha Tatashin 2022-01-14 196 void __page_table_check_pmd_set(struct mm_struct *mm, unsigned long addr, df4e817b710809 Pasha Tatashin 2022-01-14 197 pmd_t *pmdp, pmd_t pmd) df4e817b710809 Pasha Tatashin 2022-01-14 198 { df4e817b710809 Pasha Tatashin 2022-01-14 199 if (&init_mm == mm) df4e817b710809 Pasha Tatashin 2022-01-14 200 return; df4e817b710809 Pasha Tatashin 2022-01-14 201 64d8b9e14512ce Pasha Tatashin 2022-02-03 202 __page_table_check_pmd_clear(mm, addr, *pmdp); df4e817b710809 Pasha Tatashin 2022-01-14 203 if (pmd_user_accessible_page(pmd)) { df4e817b710809 Pasha Tatashin 2022-01-14 204 page_table_check_set(mm, addr, pmd_pfn(pmd), 92fb05242a1b1e Tong Tiangen 2022-05-12 205 PMD_SIZE >> PAGE_SHIFT, df4e817b710809 Pasha Tatashin 2022-01-14 @206 pmd_write(pmd)); df4e817b710809 Pasha Tatashin 2022-01-14 207 } df4e817b710809 Pasha Tatashin 2022-01-14 208 } df4e817b710809 Pasha Tatashin 2022-01-14 209 EXPORT_SYMBOL(__page_table_check_pmd_set); df4e817b710809 Pasha Tatashin 2022-01-14 210 df4e817b710809 Pasha Tatashin 2022-01-14 211 void __page_table_check_pud_set(struct mm_struct *mm, unsigned long addr, df4e817b710809 Pasha Tatashin 2022-01-14 212 pud_t *pudp, pud_t pud) df4e817b710809 Pasha Tatashin 2022-01-14 213 { df4e817b710809 Pasha Tatashin 2022-01-14 214 if (&init_mm == mm) df4e817b710809 Pasha Tatashin 2022-01-14 215 return; df4e817b710809 Pasha Tatashin 2022-01-14 216 64d8b9e14512ce Pasha Tatashin 2022-02-03 217 __page_table_check_pud_clear(mm, addr, *pudp); df4e817b710809 Pasha Tatashin 2022-01-14 218 if (pud_user_accessible_page(pud)) { df4e817b710809 Pasha Tatashin 2022-01-14 219 page_table_check_set(mm, addr, pud_pfn(pud), 92fb05242a1b1e Tong Tiangen 2022-05-12 220 PUD_SIZE >> PAGE_SHIFT, df4e817b710809 Pasha Tatashin 2022-01-14 @221 pud_write(pud)); df4e817b710809 Pasha Tatashin 2022-01-14 222 } df4e817b710809 Pasha Tatashin 2022-01-14 223 } df4e817b710809 Pasha Tatashin 2022-01-14 224 EXPORT_SYMBOL(__page_table_check_pud_set); 80110bbfbba6f0 Pasha Tatashin 2022-02-03 225 80110bbfbba6f0 Pasha Tatashin 2022-02-03 226 void __page_table_check_pte_clear_range(struct mm_struct *mm, 80110bbfbba6f0 Pasha Tatashin 2022-02-03 227 unsigned long addr, 80110bbfbba6f0 Pasha Tatashin 2022-02-03 228 pmd_t pmd) 80110bbfbba6f0 Pasha Tatashin 2022-02-03 229 { 80110bbfbba6f0 Pasha Tatashin 2022-02-03 230 if (&init_mm == mm) 80110bbfbba6f0 Pasha Tatashin 2022-02-03 231 return; 80110bbfbba6f0 Pasha Tatashin 2022-02-03 232 80110bbfbba6f0 Pasha Tatashin 2022-02-03 @233 if (!pmd_bad(pmd) && !pmd_leaf(pmd)) { 80110bbfbba6f0 Pasha Tatashin 2022-02-03 @234 pte_t *ptep = pte_offset_map(&pmd, addr); 80110bbfbba6f0 Pasha Tatashin 2022-02-03 235 unsigned long i; 80110bbfbba6f0 Pasha Tatashin 2022-02-03 236 80110bbfbba6f0 Pasha Tatashin 2022-02-03 @237 pte_unmap(ptep); 80110bbfbba6f0 Pasha Tatashin 2022-02-03 @238 for (i = 0; i < PTRS_PER_PTE; i++) { :::::: The code at line 148 was first introduced by commit :::::: df4e817b710809425d899340dbfa8504a3ca4ba5 mm: page table check :::::: TO: Pasha Tatashin :::::: CC: Linus Torvalds -- 0-DAY CI Kernel Test Service https://01.org/lkp