Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp28286722rwd; Tue, 4 Jul 2023 16:55:42 -0700 (PDT) X-Google-Smtp-Source: APBJJlELotzufXeoFAChHIs4xJFPp8ejMwgMx0FLQ7Tww2z8brSdufW72/D4w1JV2zY3DeXc6LlU X-Received: by 2002:a25:d10:0:b0:c5d:f2af:5a24 with SMTP id 16-20020a250d10000000b00c5df2af5a24mr2481742ybn.14.1688514941836; Tue, 04 Jul 2023 16:55:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688514941; cv=none; d=google.com; s=arc-20160816; b=xwQD2UDdQcfrLsKWlliOEB/9aYng9Cpvnkmyqx52E4lYK0AulZA8mne2XWRObzW1Mh IDDWyjgJKSQAIfinAtM6k3q78T9xeSzPWIBrbkv9bD8wAFSg5qDXMCOww0xX2eQNoWK4 p9v+sH4DD5f0ACVGC0A8o+82RTOKXSlmFCRV/lqbQapAK55insmADC/xoGu0XmAyFHUF VDLY7tmarLDGJPn1R8+xpnjpgcIt0TOS/iDrV+M+e6IOVudQm0SpomacFq8R5MsklTmL sCvNbjm2FYSl0D3WJXwDYh4f1MdcJOSrZf2xT6PG2hFZXJ37ATpi0f43mylxzHjv3ee1 pOwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=4EwbgAZdQg8C5kdJs6rZf2CYRM7++KiMdab+nXV8WkE=; fh=LacCOXUdkFhIfPhiEtvV5NOcP079TsFOxEpEC4/KPhA=; b=x26CvQhyKW46HvwmTKqDGFioZRlpSttAwBo9V1L+XHkFN2xsJ+PtYvPBBMuZzdDJ7Y T2N/7UUlxnX5lVvIfUa7nLGg5e5kzalKhN+1QtEaiuMWp8pVAO0JnszP4V/aFQLjTlxJ eTp2oSJqWbR3UjXpAONipH3InV08Nt9OzdC9z1EyW7qlu662kx2i3rwDRl+EiXNJNiei F3XMl6HdP9sD0N5OekAy42uWytjMIgTf5ciWXXJ9T804BiRLs70Dpq3IBxDB2wNZdqaG qjwwyeZwZquRQbiFy2h5pzVq/n8Mt4VI8UFcMDrqG2N07W0Gqh9R3RvfyclLyj28bPnU jp0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=neAkueNT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y63-20020a633242000000b005348977b5c5si22037953pgy.97.2023.07.04.16.55.28; Tue, 04 Jul 2023 16:55:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=neAkueNT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231481AbjGDWQP (ORCPT + 99 others); Tue, 4 Jul 2023 18:16:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39702 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231455AbjGDWQN (ORCPT ); Tue, 4 Jul 2023 18:16:13 -0400 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CD1B610CF; Tue, 4 Jul 2023 15:16:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1688508968; x=1720044968; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=qMlFVc3XwF8I4lMX1o5km6Btsew8JhnZvoFefo4wFsQ=; b=neAkueNT+XSwR1RngPF6oJjmV6H4t4WaH+Lh5+6Wrx7+8+H7RVY8PGac hgaWuwcBvwYMHzJHV8XSE2FbuchvLbnl7JBl/WOT7dyctxlTEYq90ocO3 lDFWhiEjMMuqnGfiPdUaQTG5KxIYFhfqwRDNSpBqvwojp887on5kyPAtP 6d0YXwie7I9/MlKewYK9s8tw06/Nws9ZMJZdi/Hd7UX1anicSQh+Pjzoy blXBuUYvbjON9H6xmqHzvm3/T2rreMhYLEJKJrkvPAKuwNkyIXSfG/Arw 4GfBPgEI/idCc6f+U1IENTVTnKfl5l5W5nMj+RMQU9P9lTZ0+t3hsPk61 Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10761"; a="365765401" X-IronPort-AV: E=Sophos;i="6.01,181,1684825200"; d="scan'208";a="365765401" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jul 2023 15:16:08 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10761"; a="788963030" X-IronPort-AV: E=Sophos;i="6.01,181,1684825200"; d="scan'208";a="788963030" Received: from lkp-server01.sh.intel.com (HELO 783282924a45) ([10.239.97.150]) by fmsmga004.fm.intel.com with ESMTP; 04 Jul 2023 15:16:01 -0700 Received: from kbuild by 783282924a45 with local (Exim 4.96) (envelope-from ) id 1qGoJU-000IaX-23; Tue, 04 Jul 2023 22:16:00 +0000 Date: Wed, 5 Jul 2023 06:15:56 +0800 From: kernel test robot To: Muhammad Usama Anjum , Peter Xu , David Hildenbrand , Andrew Morton , =?utf-8?B?TWljaGHFgiBNaXJvc8WCYXc=?= , Andrei Vagin , Danylo Mocherniuk , Paul Gofman , Cyrill Gorcunov , Mike Rapoport , Nadav Amit Cc: oe-kbuild-all@lists.linux.dev, Linux Memory Management List , Alexander Viro , Shuah Khan , Christian Brauner , Yang Shi , Vlastimil Babka , "Liam R . Howlett" , Yun Zhou , Suren Baghdasaryan , Alex Sierra , Muhammad Usama Anjum , Matthew Wilcox , Pasha Tatashin , Axel Rasmussen , "Gustavo A . R . Silva" , Dan Williams , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kselftest@vger.kernel.org, Greg KH Subject: Re: [PATCH v22 2/5] fs/proc/task_mmu: Implement IOCTL to get and optionally clear info about PTEs Message-ID: <202307050619.OArmlJne-lkp@intel.com> References: <20230628095426.1886064-3-usama.anjum@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230628095426.1886064-3-usama.anjum@collabora.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Muhammad, kernel test robot noticed the following build errors: [auto build test ERROR on akpm-mm/mm-everything] [also build test ERROR on linus/master next-20230704] [cannot apply to v6.4] [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/Muhammad-Usama-Anjum/userfaultfd-UFFD_FEATURE_WP_ASYNC/20230628-180259 base: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything patch link: https://lore.kernel.org/r/20230628095426.1886064-3-usama.anjum%40collabora.com patch subject: [PATCH v22 2/5] fs/proc/task_mmu: Implement IOCTL to get and optionally clear info about PTEs config: arc-allyesconfig (https://download.01.org/0day-ci/archive/20230705/202307050619.OArmlJne-lkp@intel.com/config) compiler: arceb-elf-gcc (GCC) 12.3.0 reproduce: (https://download.01.org/0day-ci/archive/20230705/202307050619.OArmlJne-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/202307050619.OArmlJne-lkp@intel.com/ All errors (new ones prefixed by >>): fs/proc/task_mmu.c: In function 'pagemap_scan_pmd_entry': >> fs/proc/task_mmu.c:1996:39: error: 'HPAGE_SIZE' undeclared (first use in this function); did you mean 'PAGE_SIZE'? 1996 | n_pages < HPAGE_SIZE/PAGE_SIZE) { | ^~~~~~~~~~ | PAGE_SIZE fs/proc/task_mmu.c:1996:39: note: each undeclared identifier is reported only once for each function it appears in vim +1996 fs/proc/task_mmu.c 1959 1960 static int pagemap_scan_pmd_entry(pmd_t *pmd, unsigned long start, 1961 unsigned long end, struct mm_walk *walk) 1962 { 1963 bool is_written, flush = false, interesting = true; 1964 struct pagemap_scan_private *p = walk->private; 1965 struct vm_area_struct *vma = walk->vma; 1966 unsigned long bitmap, addr = end; 1967 pte_t *pte, *orig_pte, ptent; 1968 spinlock_t *ptl; 1969 int ret = 0; 1970 1971 arch_enter_lazy_mmu_mode(); 1972 1973 #ifdef CONFIG_TRANSPARENT_HUGEPAGE 1974 ptl = pmd_trans_huge_lock(pmd, vma); 1975 if (ptl) { 1976 unsigned long n_pages = (end - start)/PAGE_SIZE; 1977 1978 if (n_pages > p->max_pages - p->found_pages) 1979 n_pages = p->max_pages - p->found_pages; 1980 1981 is_written = !is_pmd_uffd_wp(*pmd); 1982 1983 bitmap = PM_SCAN_FLAGS(is_written, false, 1984 pmd_present(*pmd), is_swap_pmd(*pmd), 1985 pmd_present(*pmd) && is_zero_pfn(pmd_pfn(*pmd))); 1986 1987 if (IS_PM_SCAN_GET(p->flags)) 1988 interesting = pagemap_scan_is_interesting_page(bitmap, p); 1989 1990 if (interesting) { 1991 /* 1992 * Break huge page into small pages if the WP operation 1993 * need to be performed is on a portion of the huge page. 1994 */ 1995 if (is_written && IS_PM_SCAN_WP(p->flags) && > 1996 n_pages < HPAGE_SIZE/PAGE_SIZE) { 1997 spin_unlock(ptl); 1998 1999 split_huge_pmd(vma, pmd, start); 2000 goto process_smaller_pages; 2001 } 2002 2003 if (IS_PM_SCAN_GET(p->flags)) 2004 ret = pagemap_scan_output(bitmap, p, start, n_pages); 2005 2006 if (IS_PM_SCAN_WP(p->flags) && is_written && ret >= 0) { 2007 make_uffd_wp_pmd(vma, start, pmd); 2008 flush_tlb_range(vma, start, end); 2009 } 2010 } 2011 2012 spin_unlock(ptl); 2013 arch_leave_lazy_mmu_mode(); 2014 2015 return ret; 2016 } 2017 2018 process_smaller_pages: 2019 #endif 2020 2021 orig_pte = pte = pte_offset_map_lock(vma->vm_mm, pmd, start, &ptl); 2022 if (!pte) { 2023 walk->action = ACTION_AGAIN; 2024 return 0; 2025 } 2026 2027 for (addr = start; addr < end && !ret; pte++, addr += PAGE_SIZE) { 2028 ptent = ptep_get(pte); 2029 is_written = !is_pte_uffd_wp(ptent); 2030 2031 bitmap = PM_SCAN_FLAGS(is_written, pagemap_scan_is_file(vma, ptent, addr), 2032 pte_present(ptent), is_swap_pte(ptent), 2033 pte_present(ptent) && is_zero_pfn(pte_pfn(ptent))); 2034 2035 if (IS_PM_SCAN_GET(p->flags)) { 2036 interesting = pagemap_scan_is_interesting_page(bitmap, p); 2037 if (interesting) 2038 ret = pagemap_scan_output(bitmap, p, addr, 1); 2039 } 2040 2041 if (IS_PM_SCAN_WP(p->flags) && is_written && interesting && 2042 ret >= 0) { 2043 make_uffd_wp_pte(vma, addr, pte); 2044 flush = true; 2045 } 2046 } 2047 2048 if (flush) 2049 flush_tlb_range(vma, start, addr); 2050 2051 pte_unmap_unlock(orig_pte, ptl); 2052 arch_leave_lazy_mmu_mode(); 2053 2054 cond_resched(); 2055 return ret; 2056 } 2057 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki