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 C5365C7618D for ; Thu, 6 Apr 2023 11:41:05 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E63976B0071; Thu, 6 Apr 2023 07:41:04 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id E12C66B0074; Thu, 6 Apr 2023 07:41:04 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id CDB476B0075; Thu, 6 Apr 2023 07:41:04 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id BDC726B0071 for ; Thu, 6 Apr 2023 07:41:04 -0400 (EDT) Received: from smtpin14.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 7FCA1A0EFC for ; Thu, 6 Apr 2023 11:41:04 +0000 (UTC) X-FDA: 80650774848.14.56C67F4 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by imf25.hostedemail.com (Postfix) with ESMTP id 4CA1CA0009 for ; Thu, 6 Apr 2023 11:41:00 +0000 (UTC) Authentication-Results: imf25.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=brXPoxNY; dmarc=pass (policy=none) header.from=intel.com; spf=pass (imf25.hostedemail.com: domain of lkp@intel.com designates 192.55.52.120 as permitted sender) smtp.mailfrom=lkp@intel.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1680781262; 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=cHbRri49JiOVM9YvILGfs0lYql3gfRbelidRfYGZhf0=; b=35VHGp/e8wbabOHh/BvR2BFRHCqYOkkTEu1Sf2tSY0a7BRIrFc9tUZ5LomQQGePqyhXWO/ 4GRLqVwGZBLislJ6u8J7STsL7vL58Xb5JxLAbHfzdsc1+idqrbi6LpIZsSlRlDDgrO2fH5 LoZPxJlKqWMTuo4Qd8X40xgysOMxFPs= ARC-Authentication-Results: i=1; imf25.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=brXPoxNY; dmarc=pass (policy=none) header.from=intel.com; spf=pass (imf25.hostedemail.com: domain of lkp@intel.com designates 192.55.52.120 as permitted sender) smtp.mailfrom=lkp@intel.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1680781262; a=rsa-sha256; cv=none; b=ExTG1TdxV7Zw/oXKRoM+dggDqKANycSPoQLFEXYOiLuKoQtDEWFTMqW4yCv7jUHfN1MrjM blo+gT/7TUTv1XJeXGktvXF/2VYSquuEgxF9PvSJRIw3zAqDyetaFmshvxpVhJISr7vby5 R7lVQhRM1CB3YpUmvafvCHVkXh8udgY= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1680781260; x=1712317260; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=0A6pzuzFn2elHyZpdsZZeMbmY8fDQBiyiiSii7bFRJc=; b=brXPoxNYtp9WhSiG75GSG0EqGsQwZjw/hamaErNtAgjU1HUJ2SlY8ZnA nEa60XEuVYF5uy/eX1HeuoPr8oE4hjP1/NK+N3RahNwZwUNXrtSbb2h87 M8l9B4FoaF59Dp4NCtzwQqa3+lqapC8C6A11ROULwLrDkvo811SLOn3Ax r06LR1Yu3jrttHoWFYSq3CxfkE2rp+Fe3c1Njgy4dOYrp7CUTOFe7GKSr WIB5C9SHnZA2fssCIM+TT7kKQD3Qtfe3yp738lx2jXCBxYkr0zzWkPFC+ dyBtBjS7X9NYPA4bQBL92xIpBbxbkV+BCwEJEymsN+78hLWRFZaUUhrLo g==; X-IronPort-AV: E=McAfee;i="6600,9927,10671"; a="341446563" X-IronPort-AV: E=Sophos;i="5.98,323,1673942400"; d="scan'208";a="341446563" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Apr 2023 04:40:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10671"; a="689638841" X-IronPort-AV: E=Sophos;i="5.98,323,1673942400"; d="scan'208";a="689638841" Received: from lkp-server01.sh.intel.com (HELO b613635ddfff) ([10.239.97.150]) by fmsmga007.fm.intel.com with ESMTP; 06 Apr 2023 04:40:50 -0700 Received: from kbuild by b613635ddfff with local (Exim 4.96) (envelope-from ) id 1pkNyz-000RKs-0W; Thu, 06 Apr 2023 11:40:49 +0000 Date: Thu, 6 Apr 2023 19:40:21 +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 v12 2/5] fs/proc/task_mmu: Implement IOCTL to get and optionally clear info about PTEs Message-ID: <202304061914.N1Hmx12N-lkp@intel.com> References: <20230406074005.1784728-3-usama.anjum@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230406074005.1784728-3-usama.anjum@collabora.com> X-Rspam-User: X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: 4CA1CA0009 X-Stat-Signature: 41e7tq9wbszpi6jmsjdwwphx665pdjfk X-HE-Tag: 1680781260-163243 X-HE-Meta: U2FsdGVkX1/e1EjdvkJvgZ1NA7Q8ZpRqln9TwzABBsHJ4tFefpJi9nYc6f9yAkKhvbxSnXMCMDrPqHYshDa/YeRNumDyIb0xaiyxt3+ZykQpWcGkTn7XOoNvpXcKDO2OI+YXOsjoa75QxGeM13xdrXrb3v9WAUlrbAOPYTMg2pXRjb09t5Jg3LCoWdhqaRUzGGBAK0DxIEd7Zmi8olw4jsejzD2EGAJ4CuIzRnBXeksYrmv9vsD9JrVjdmCjc0QfHjq4EDmXQhpRB11XDlTqUYa2cHxzWBmAmxzMQxt9bHQat/Iw9tLOsdH4fP7XvlrfIKcXKDqji2EnJbgrd1A8zMoYy2vmZjwaFcZ89OMEsnyJKKncHenGGl05Xptqebmop26t/KNCF0g60SWTBIMOPq6KIuLoUOxa96rDdIRXHjb6RFQh4nHZAtIEzBtgWb2tAOaECKQenOas5bCHQ1BxK4LlkVH2vH/5fzwUu7is2gQT+SSBMscQ6w2GZ5XBhPyA4sWfz295kwHSrV0lJ2a3sL37GEI2bHQExeNr9PcjQWhLsYOLGNgA1Xu5zeZjxsvWGzMXX1rKj52sKKAszpm4DniqSHr/fYFMUqIIsBYuiu2E2SsNspWk8WMl5QOUVxYaiXOCEKBmyKC2FsVRIAtEuLT8ML28IGbuDO+NUhfJj6Dhpj+1n2uJyKLWUEFo/1AV3xQ8ezsZANldDG5aAPVvsFWe9jiHGXfM2gMeaLc59ocjX0UzoVwfFe70ZqLQcNGXCRiFg0BTZ3in7n92Qn+p2J74dkpTGfd5WIla0+3mDn9SxJq/BKY2rbl9R197RAESQbyLY4ffbvL1ZFG6/p9MOTGS2IKMzxkZWYc2ZIn0aQDR5Lfta2Oo27FdC2Bj0caijVg4Yd/WhDMOnaamky8gTAqR1SC+H/p1GfvQV1+nzXyoHXjofCRAcIv4SH13snQozlhNZjHU2mnYPArahWM fXPco2jC JEedlnHzAAk3gTqpQPZ4pHlRwYRMX5V6kR2VdXfZ84GwVhhfZNiBC4mrPr2H7VodYBYvZaHjXL1gDx2scqnvR4utABLLOc5q4YWvWsnprdi5+exgVHGVGtJ1CHPV47KI/SRhOkiEwySsFo0W1XTBSWLJb9rPEKKdSzj5H5QYW0Kwg8J9SOA1/GmMsNeWeR+BaAP5tOXePij8SpxXb8ef1jpO4DJh5uYBw/Hq2p3jwFlWkuXEyo+KLS9N6ee+6UMwlTUQCN105FLJ+YKlDKfMAkVK6AzON52E7rg3mjFjJ2iu0s7Rb+Xqo3+WGlCTscJxsXctq58lZBPRwRj9WSy1331IdkdK0QqxwCfd6VWeVwbQhPH1V6Ws6008cP3KHmnaRzamg0YjzTIPHa7pwvVtxKnuLiJeM6WYrWIsQDZyCrnlkCSITTpIz0AQIJKqgSA3oQgWU0aqlUxLFe0HfCXDpVnFplTxn/Ys3kNAUCGXEXGj1boEVDU1m52FJTbF8BooxNf4DFKtgx1znKv4Lbhd5e5pwZ11NCEXPM+29pQ775WIrD4Q= 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 Muhammad, kernel test robot noticed the following build errors: [auto build test ERROR on akpm-mm/mm-everything] [also build test ERROR on next-20230406] [cannot apply to linus/master v6.3-rc5] [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/20230406-154314 base: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything patch link: https://lore.kernel.org/r/20230406074005.1784728-3-usama.anjum%40collabora.com patch subject: [PATCH v12 2/5] fs/proc/task_mmu: Implement IOCTL to get and optionally clear info about PTEs config: arc-randconfig-r023-20230405 (https://download.01.org/0day-ci/archive/20230406/202304061914.N1Hmx12N-lkp@intel.com/config) compiler: arceb-elf-gcc (GCC) 12.1.0 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 # https://github.com/intel-lab-lkp/linux/commit/f13abb36f64c77913509da8ca157512d2fb9f031 git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Muhammad-Usama-Anjum/userfaultfd-UFFD_FEATURE_WP_ASYNC/20230406-154314 git checkout f13abb36f64c77913509da8ca157512d2fb9f031 # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=arc olddefconfig COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=arc SHELL=/bin/bash fs/proc/ If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot | Link: https://lore.kernel.org/oe-kbuild-all/202304061914.N1Hmx12N-lkp@intel.com/ All error/warnings (new ones prefixed by >>): fs/proc/task_mmu.c: In function 'pagemap_scan_pmd_entry': >> fs/proc/task_mmu.c:1921:37: error: 'HPAGE_SIZE' undeclared (first use in this function); did you mean 'PAGE_SIZE'? 1921 | ((end - start < HPAGE_SIZE) || | ^~~~~~~~~~ | PAGE_SIZE fs/proc/task_mmu.c:1921:37: note: each undeclared identifier is reported only once for each function it appears in >> fs/proc/task_mmu.c:1939:35: error: passing argument 1 of 'uffd_wp_range' from incompatible pointer type [-Werror=incompatible-pointer-types] 1939 | uffd_wp_range(vma, start, HPAGE_SIZE, true) < 0) | ^~~ | | | struct vm_area_struct * In file included from include/linux/mm_inline.h:9, from fs/proc/task_mmu.c:3: include/linux/userfaultfd_k.h:215:52: note: expected 'struct mm_struct *' but argument is of type 'struct vm_area_struct *' 215 | static inline long uffd_wp_range(struct mm_struct *dst_mm, | ~~~~~~~~~~~~~~~~~~^~~~~~ >> fs/proc/task_mmu.c:1939:40: warning: passing argument 2 of 'uffd_wp_range' makes pointer from integer without a cast [-Wint-conversion] 1939 | uffd_wp_range(vma, start, HPAGE_SIZE, true) < 0) | ^~~~~ | | | long unsigned int include/linux/userfaultfd_k.h:216:57: note: expected 'struct vm_area_struct *' but argument is of type 'long unsigned int' 216 | struct vm_area_struct *vma, | ~~~~~~~~~~~~~~~~~~~~~~~^~~ >> fs/proc/task_mmu.c:1939:21: error: too few arguments to function 'uffd_wp_range' 1939 | uffd_wp_range(vma, start, HPAGE_SIZE, true) < 0) | ^~~~~~~~~~~~~ include/linux/userfaultfd_k.h:215:20: note: declared here 215 | static inline long uffd_wp_range(struct mm_struct *dst_mm, | ^~~~~~~~~~~~~ fs/proc/task_mmu.c:1965:35: error: passing argument 1 of 'uffd_wp_range' from incompatible pointer type [-Werror=incompatible-pointer-types] 1965 | uffd_wp_range(vma, addr, PAGE_SIZE, true) < 0) | ^~~ | | | struct vm_area_struct * include/linux/userfaultfd_k.h:215:52: note: expected 'struct mm_struct *' but argument is of type 'struct vm_area_struct *' 215 | static inline long uffd_wp_range(struct mm_struct *dst_mm, | ~~~~~~~~~~~~~~~~~~^~~~~~ fs/proc/task_mmu.c:1965:40: warning: passing argument 2 of 'uffd_wp_range' makes pointer from integer without a cast [-Wint-conversion] 1965 | uffd_wp_range(vma, addr, PAGE_SIZE, true) < 0) | ^~~~ | | | long unsigned int include/linux/userfaultfd_k.h:216:57: note: expected 'struct vm_area_struct *' but argument is of type 'long unsigned int' 216 | struct vm_area_struct *vma, | ~~~~~~~~~~~~~~~~~~~~~~~^~~ fs/proc/task_mmu.c:1965:21: error: too few arguments to function 'uffd_wp_range' 1965 | uffd_wp_range(vma, addr, PAGE_SIZE, true) < 0) | ^~~~~~~~~~~~~ include/linux/userfaultfd_k.h:215:20: note: declared here 215 | static inline long uffd_wp_range(struct mm_struct *dst_mm, | ^~~~~~~~~~~~~ cc1: some warnings being treated as errors vim +1921 fs/proc/task_mmu.c 1891 1892 static int pagemap_scan_pmd_entry(pmd_t *pmd, unsigned long start, 1893 unsigned long end, struct mm_walk *walk) 1894 { 1895 struct pagemap_scan_private *p = walk->private; 1896 bool is_written, is_file, is_present, is_swap; 1897 struct vm_area_struct *vma = walk->vma; 1898 unsigned long addr = end; 1899 spinlock_t *ptl; 1900 int ret = 0; 1901 pte_t *pte; 1902 1903 #ifdef CONFIG_TRANSPARENT_HUGEPAGE 1904 ptl = pmd_trans_huge_lock(pmd, vma); 1905 if (ptl) { 1906 unsigned long n_pages = (end - start)/PAGE_SIZE; 1907 1908 is_written = !is_pmd_uffd_wp(*pmd); 1909 is_file = vma->vm_file; 1910 is_present = pmd_present(*pmd); 1911 is_swap = is_swap_pmd(*pmd); 1912 1913 spin_unlock(ptl); 1914 1915 /* 1916 * Break huge page into small pages if the WP operation need to 1917 * be performed is on a portion of the huge page or if max_pages 1918 * pages limit would exceed. 1919 */ 1920 if (is_written && PM_SCAN_OP_IS_WP(p) && > 1921 ((end - start < HPAGE_SIZE) || 1922 (p->max_pages && 1923 (p->max_pages - p->found_pages) < n_pages))) { 1924 1925 split_huge_pmd(vma, pmd, start); 1926 goto process_smaller_pages; 1927 } 1928 1929 if (p->max_pages && 1930 p->found_pages + n_pages > p->max_pages) 1931 n_pages = p->max_pages - p->found_pages; 1932 1933 ret = pagemap_scan_output(is_written, is_file, is_present, 1934 is_swap, p, start, n_pages); 1935 if (ret < 0) 1936 return ret; 1937 1938 if (is_written && PM_SCAN_OP_IS_WP(p) && > 1939 uffd_wp_range(vma, start, HPAGE_SIZE, true) < 0) 1940 ret = -EINVAL; 1941 1942 return ret; 1943 } 1944 process_smaller_pages: 1945 if (pmd_trans_unstable(pmd)) 1946 return 0; 1947 #endif 1948 1949 for (addr = start; addr < end && !ret; pte++, addr += PAGE_SIZE) { 1950 pte = pte_offset_map_lock(vma->vm_mm, pmd, addr, &ptl); 1951 1952 is_written = !is_pte_uffd_wp(*pte); 1953 is_file = vma->vm_file; 1954 is_present = pte_present(*pte); 1955 is_swap = is_swap_pte(*pte); 1956 1957 pte_unmap_unlock(pte, ptl); 1958 1959 ret = pagemap_scan_output(is_written, is_file, is_present, 1960 is_swap, p, addr, 1); 1961 if (ret < 0) 1962 return ret; 1963 1964 if (is_written && PM_SCAN_OP_IS_WP(p) && 1965 uffd_wp_range(vma, addr, PAGE_SIZE, true) < 0) 1966 return -EINVAL; 1967 } 1968 1969 cond_resched(); 1970 return ret; 1971 } 1972 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests