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 7A4C5C7EE23 for ; Fri, 12 May 2023 03:52:43 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 035586B0071; Thu, 11 May 2023 23:52:43 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id F28106B0074; Thu, 11 May 2023 23:52:42 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DEF6B6B0075; Thu, 11 May 2023 23:52:42 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id D10406B0071 for ; Thu, 11 May 2023 23:52:42 -0400 (EDT) Received: from smtpin21.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id A0C24C07F5 for ; Fri, 12 May 2023 03:52:42 +0000 (UTC) X-FDA: 80780231364.21.B298AEA Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by imf16.hostedemail.com (Postfix) with ESMTP id 75D04180003 for ; Fri, 12 May 2023 03:52:40 +0000 (UTC) Authentication-Results: imf16.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=TKvE2ZNp; spf=pass (imf16.hostedemail.com: domain of lkp@intel.com designates 192.55.52.43 as permitted sender) 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=1683863560; 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:in-reply-to:references:references:dkim-signature; bh=/hlPnwEXV+ibS81cOsFtMixdxJBQKKo16lGI1DuOIIQ=; b=5WDSPQ61N0ZXi75JeQykrz8zcfVhZ2TTljaFaPvDM7aO+apoC2/nAX0n9rh/AJM3fqz9Ee lpzF8lBwJeyBAoU+WXaTGXbkNmVlUPtw9Ob/Q8SU8XGifmSG16FSMzecs754sVS+KQaGCQ CrPkccbFbQ9LC6hgvtsgFDR6KJDZ6mY= ARC-Authentication-Results: i=1; imf16.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=TKvE2ZNp; spf=pass (imf16.hostedemail.com: domain of lkp@intel.com designates 192.55.52.43 as permitted sender) smtp.mailfrom=lkp@intel.com; dmarc=pass (policy=none) header.from=intel.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1683863560; a=rsa-sha256; cv=none; b=ItMQN/WkBaRv6Hbl89nv2ECjMcGqS/9SF+phXBOt4gtfYmeozXvOodGfb42sft2TcYink+ BeF+kUIxuDU0+xb2fEbayoJneFe/LTge2r+hqvpV3iN+bnkVb9ck0rcvWYIU9fPv2zpqR5 L8gx9eLLOA16CZBSXLXqHHaKPwNDRYs= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1683863560; x=1715399560; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=zxt7hPB2+ztJ+OYn+X/DEVpHycbofSJLgMlLpvez+So=; b=TKvE2ZNpr4wcvhezcNCkipao47Z509uP5Fwamnevc62GBS2/mOwqEMtD +CWrO9oetzvinXPy41/Kmj3vLFO+xijPSL1FWCe7JJ0Cn+ambQyvZar5M isX3CCENkg/w7xR396ftcboW/zTKPWb7U7VxFsb6fUVIlC53pL+p4JDg0 WOKsVPg3G8YLEF1HGRvQDXhYj8xdXUy9VFc+hFcxcJO2Pqyd+JAZrmC+w VoaeFf7tKHNauzYLOmFOpjwotVBYIM9IYb3zK7qt84TiLNiS7wUB5eJvQ 71lyhVCZTxu3YLgSV9zXNqA3qTqWSu1YVB3ZAh5jSRLwIVHX0lOt3J4Mp A==; X-IronPort-AV: E=McAfee;i="6600,9927,10707"; a="437027734" X-IronPort-AV: E=Sophos;i="5.99,269,1677571200"; d="scan'208";a="437027734" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 May 2023 20:52:38 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10707"; a="769629428" X-IronPort-AV: E=Sophos;i="5.99,269,1677571200"; d="scan'208";a="769629428" Received: from lkp-server01.sh.intel.com (HELO dea6d5a4f140) ([10.239.97.150]) by fmsmga004.fm.intel.com with ESMTP; 11 May 2023 20:52:35 -0700 Received: from kbuild by dea6d5a4f140 with local (Exim 4.96) (envelope-from ) id 1pxJpa-0004TG-2G; Fri, 12 May 2023 03:52:34 +0000 Date: Fri, 12 May 2023 11:52:20 +0800 From: kernel test robot To: Peter Xu , Linus Torvalds Cc: oe-kbuild-all@lists.linux.dev, LKML , Andrew Lutomirski , Johannes Weiner , "Matthew Wilcox (Oracle)" , Josef Bacik , Andrew Morton , Linux Memory Management List , linux-fsdevel@vger.kernel.org, Dan Carpenter , syzbot+48011b86c8ea329af1b9@syzkaller.appspotmail.com, Christoph Hellwig Subject: Re: [PATCH 1/3] mm: handle_mm_fault_one() Message-ID: <202305121115.gTte4W7A-lkp@intel.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspam-User: X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: 75D04180003 X-Stat-Signature: crt91mxgkd8myy5mt1rnz64ro6um81ws X-HE-Tag: 1683863560-989444 X-HE-Meta: U2FsdGVkX1+bMZVDcDqVhU2zycQqGgXduDErJbf6KCXPTI+dSS/v+SNTCLAd1Pq0P/DOTnHqP0alrbeYJUckMiASd9VOmum93AjPPg9uSAtslpe9k4sRJ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hIrmZBKfNmcq7XmCHxcrQch+zBdFm+DmbrjLfArJhSwab69ulynajuhsooVr0A1mrk6KudIPVnqzaTimKAvwGb1QcBVFuCz/2XKq4LljkzqcnNE0vL722vCSD6M6pTmKNte7Ol6kmErcN5TNYDbhE6emHLlJKmXBQ0Ut7MGpfF5UkCYcltUh8+4V7h8HJaNzc/JqO7qy6EHh4UHUoBRuHI56bBGJhoVauffK7WBRAcYkS/E+Kg= 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 Peter, kernel test robot noticed the following build errors: [auto build test ERROR on akpm-mm/mm-everything] url: https://github.com/intel-lab-lkp/linux/commits/Peter-Xu/mm-handle_mm_fault_one/20230512-081554 base: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything patch link: https://lore.kernel.org/r/ZF2E6i4pqJr7m436%40x1n patch subject: [PATCH 1/3] mm: handle_mm_fault_one() config: x86_64-randconfig-a013 (https://download.01.org/0day-ci/archive/20230512/202305121115.gTte4W7A-lkp@intel.com/config) compiler: gcc-11 (Debian 11.3.0-12) 11.3.0 reproduce (this is a W=1 build): # https://github.com/intel-lab-lkp/linux/commit/0a03a4870c8a62e3ba52a0f9b50b307f509acb2b git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Peter-Xu/mm-handle_mm_fault_one/20230512-081554 git checkout 0a03a4870c8a62e3ba52a0f9b50b307f509acb2b # save the config file mkdir build_dir && cp config build_dir/.config make W=1 O=build_dir ARCH=x86_64 olddefconfig make W=1 O=build_dir ARCH=x86_64 prepare If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot | Link: https://lore.kernel.org/oe-kbuild-all/202305121115.gTte4W7A-lkp@intel.com/ All errors (new ones prefixed by >>): In file included from include/linux/memcontrol.h:20, from include/linux/swap.h:9, from include/linux/suspend.h:5, from arch/x86/kernel/asm-offsets.c:14: include/linux/mm.h: In function 'mm_should_release_mmap': >> include/linux/mm.h:2371:13: error: 'fault' undeclared (first use in this function) 2371 | if (fault & (VM_FAULT_RETRY | VM_FAULT_COMPLETED)) | ^~~~~ include/linux/mm.h:2371:13: note: each undeclared identifier is reported only once for each function it appears in include/linux/mm.h: In function 'handle_mm_fault_one': >> include/linux/mm.h:2396:34: error: 'mm' undeclared (first use in this function); did you mean 'tm'? 2396 | mmap_read_unlock(mm); | ^~ | tm make[2]: *** [scripts/Makefile.build:114: arch/x86/kernel/asm-offsets.s] Error 1 make[2]: Target 'prepare' not remade because of errors. make[1]: *** [Makefile:1287: prepare0] Error 2 make[1]: Target 'prepare' not remade because of errors. make: *** [Makefile:226: __sub-make] Error 2 make: Target 'prepare' not remade because of errors. vim +/fault +2371 include/linux/mm.h 2362 2363 static inline bool 2364 mm_should_release_mmap(unsigned long flags, vm_fault_t retval) 2365 { 2366 /* The caller explicitly requested to keep the mmap read lock */ 2367 if (flags & FAULT_FLAG_RETRY_NOWAIT) 2368 return false; 2369 2370 /* If the mmap read lock is already released, we're all good */ > 2371 if (fault & (VM_FAULT_RETRY | VM_FAULT_COMPLETED)) 2372 return false; 2373 2374 /* Otherwise always release it */ 2375 return true; 2376 } 2377 2378 /* 2379 * This is mostly handle_mm_fault(), but it also take care of releasing 2380 * mmap or vma read lock as long as possible (e.g. when !RETRY_NOWAIT). 2381 * 2382 * Normally it's the case when we got a hardware page fault, where we want 2383 * to release the lock right after the page fault. And it's not for case 2384 * like GUP where it can fault a range of pages continuously with mmap lock 2385 * being held during the process. 2386 */ 2387 static inline vm_fault_t 2388 handle_mm_fault_one(struct vm_area_struct *vma, unsigned long address, 2389 unsigned int flags, struct pt_regs *regs) 2390 { 2391 vm_fault_t retval = handle_mm_fault(vma, address, flags, regs); 2392 2393 if (flags & FAULT_FLAG_VMA_LOCK) 2394 vma_end_read(vma); 2395 else if (mm_should_release_mmap(flags, retval)) > 2396 mmap_read_unlock(mm); 2397 2398 return retval; 2399 } 2400 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests