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 E178FC433EF for ; Sat, 23 Apr 2022 19:23:48 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 30FA76B0074; Sat, 23 Apr 2022 15:23:48 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 2BF746B0075; Sat, 23 Apr 2022 15:23:48 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 185C86B0078; Sat, 23 Apr 2022 15:23:48 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.a.hostedemail.com [64.99.140.24]) by kanga.kvack.org (Postfix) with ESMTP id 0A70E6B0074 for ; Sat, 23 Apr 2022 15:23:48 -0400 (EDT) Received: from smtpin26.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay12.hostedemail.com (Postfix) with ESMTP id B21341215D9 for ; Sat, 23 Apr 2022 19:23:47 +0000 (UTC) X-FDA: 79389118494.26.03FAA08 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by imf18.hostedemail.com (Postfix) with ESMTP id 2DC2C1C002E for ; Sat, 23 Apr 2022 19:23:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1650741826; x=1682277826; h=date:from:to:cc:subject:message-id:mime-version; bh=bhs+5WzVIT98fTTS3exvw5WqrDWBDTg59FpFuwRgFjo=; b=XKaS4dc3fhzok+gcLZkQf89bg2/oD8c24/7e/QRnENdooAxvmjAXSEXP zFeLuR5+jLe/QMvPt77iuB/mCQRIm2wJ6NF4EEAu3KTd6piabD+D39HRW UYxsyoRFwiu1QLZQmA2yGQvjvBHt8Ipd8+YLfeVs8FOOHF6I+MdKWtJO4 tHJY2My49stG/7SZwxWB2jPCQDahHJ6DPW0hDzdIQNnpMAa67rDNzX2Fv kwR4dQcKcrXeKC/pkPTPkb9pRtZsZ6dqP8RX714fx4CXtxkcPBUmzXvrE g+1WfbCGU5fOSBkmKs6yyzu393b1rhqIRShJM2m4q3hhMorQjl7s7q7bj A==; X-IronPort-AV: E=McAfee;i="6400,9594,10326"; a="264442093" X-IronPort-AV: E=Sophos;i="5.90,285,1643702400"; d="scan'208";a="264442093" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Apr 2022 12:23:44 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,285,1643702400"; d="scan'208";a="703994587" Received: from lkp-server01.sh.intel.com (HELO 5056e131ad90) ([10.239.97.150]) by fmsmga001.fm.intel.com with ESMTP; 23 Apr 2022 12:23:42 -0700 Received: from kbuild by 5056e131ad90 with local (Exim 4.95) (envelope-from ) id 1niLM6-0000NR-33; Sat, 23 Apr 2022 19:23:42 +0000 Date: Sun, 24 Apr 2022 03:23:23 +0800 From: kernel test robot To: Peter Xu Cc: kbuild-all@lists.01.org, Linux Memory Management List , Andrew Morton Subject: [linux-next:master 5085/5845] fs/userfaultfd.c:337:13: error: implicit declaration of function 'pte_none_mostly' Message-ID: <202204240320.TGDuGcsL-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Rspamd-Queue-Id: 2DC2C1C002E X-Stat-Signature: 4tc47c8gouu43umuuwwmizygc8hoouds X-Rspam-User: Authentication-Results: imf18.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=XKaS4dc3; spf=none (imf18.hostedemail.com: domain of lkp@intel.com has no SPF policy when checking 134.134.136.24) smtp.mailfrom=lkp@intel.com; dmarc=pass (policy=none) header.from=intel.com X-Rspamd-Server: rspam09 X-HE-Tag: 1650741822-999005 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: tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: e7d6987e09a328d4a949701db40ef63fbb970670 commit: 70a8da53f7cb7368776f9d2790ecbb4f8bc53ba5 [5085/5845] mm: teach core mm about pte markers config: x86_64-randconfig-a002-20210928 (https://download.01.org/0day-ci/archive/20220424/202204240320.TGDuGcsL-lkp@intel.com/config) compiler: gcc-11 (Debian 11.2.0-20) 11.2.0 reproduce (this is a W=1 build): # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=70a8da53f7cb7368776f9d2790ecbb4f8bc53ba5 git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git git fetch --no-tags linux-next master git checkout 70a8da53f7cb7368776f9d2790ecbb4f8bc53ba5 # save the config file mkdir build_dir && cp config build_dir/.config make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot Note: the linux-next/master HEAD e7d6987e09a328d4a949701db40ef63fbb970670 builds fine. It may have been fixed somewhere. All errors (new ones prefixed by >>): fs/userfaultfd.c: In function 'userfaultfd_must_wait': >> fs/userfaultfd.c:337:13: error: implicit declaration of function 'pte_none_mostly' [-Werror=implicit-function-declaration] 337 | if (pte_none_mostly(*pte)) | ^~~~~~~~~~~~~~~ cc1: some warnings being treated as errors vim +/pte_none_mostly +337 fs/userfaultfd.c 272 273 /* 274 * Verify the pagetables are still not ok after having reigstered into 275 * the fault_pending_wqh to avoid userland having to UFFDIO_WAKE any 276 * userfault that has already been resolved, if userfaultfd_read and 277 * UFFDIO_COPY|ZEROPAGE are being run simultaneously on two different 278 * threads. 279 */ 280 static inline bool userfaultfd_must_wait(struct userfaultfd_ctx *ctx, 281 unsigned long address, 282 unsigned long flags, 283 unsigned long reason) 284 { 285 struct mm_struct *mm = ctx->mm; 286 pgd_t *pgd; 287 p4d_t *p4d; 288 pud_t *pud; 289 pmd_t *pmd, _pmd; 290 pte_t *pte; 291 bool ret = true; 292 293 mmap_assert_locked(mm); 294 295 pgd = pgd_offset(mm, address); 296 if (!pgd_present(*pgd)) 297 goto out; 298 p4d = p4d_offset(pgd, address); 299 if (!p4d_present(*p4d)) 300 goto out; 301 pud = pud_offset(p4d, address); 302 if (!pud_present(*pud)) 303 goto out; 304 pmd = pmd_offset(pud, address); 305 /* 306 * READ_ONCE must function as a barrier with narrower scope 307 * and it must be equivalent to: 308 * _pmd = *pmd; barrier(); 309 * 310 * This is to deal with the instability (as in 311 * pmd_trans_unstable) of the pmd. 312 */ 313 _pmd = READ_ONCE(*pmd); 314 if (pmd_none(_pmd)) 315 goto out; 316 317 ret = false; 318 if (!pmd_present(_pmd)) 319 goto out; 320 321 if (pmd_trans_huge(_pmd)) { 322 if (!pmd_write(_pmd) && (reason & VM_UFFD_WP)) 323 ret = true; 324 goto out; 325 } 326 327 /* 328 * the pmd is stable (as in !pmd_trans_unstable) so we can re-read it 329 * and use the standard pte_offset_map() instead of parsing _pmd. 330 */ 331 pte = pte_offset_map(pmd, address); 332 /* 333 * Lockless access: we're in a wait_event so it's ok if it 334 * changes under us. PTE markers should be handled the same as none 335 * ptes here. 336 */ > 337 if (pte_none_mostly(*pte)) 338 ret = true; 339 if (!pte_write(*pte) && (reason & VM_UFFD_WP)) 340 ret = true; 341 pte_unmap(pte); 342 343 out: 344 return ret; 345 } 346 -- 0-DAY CI Kernel Test Service https://01.org/lkp