lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202210020431.AMUaz7hp-lkp@intel.com>
Date:   Sun, 2 Oct 2022 04:39:33 +0800
From:   kernel test robot <lkp@...el.com>
To:     alexlzhu@...com, linux-mm@...ck.org
Cc:     kbuild-all@...ts.01.org, willy@...radead.org,
        akpm@...ux-foundation.org, riel@...riel.com, hannes@...xchg.org,
        linux-kernel@...r.kernel.org, kernel-team@...com,
        Alexander Zhu <alexlzhu@...com>
Subject: Re: [PATCH 2/3] mm: changes to split_huge_page() to free zero filled
 tail pages

Hi,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on shuah-kselftest/next]
[also build test ERROR on linus/master v6.0-rc7]
[cannot apply to next-20220930]
[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/alexlzhu-fb-com/THP-Shrinker/20220928-144734
base:   https://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest.git next
config: riscv-defconfig
compiler: riscv64-linux-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/38695283863b17d0164586f477bdf826196f90eb
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review alexlzhu-fb-com/THP-Shrinker/20220928-144734
        git checkout 38695283863b17d0164586f477bdf826196f90eb
        # 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=riscv SHELL=/bin/bash

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>

All errors (new ones prefixed by >>):

   mm/migrate.c: In function 'try_to_unmap_clean':
>> mm/migrate.c:204:32: error: 'THP_SPLIT_REMAP_READONLY_ZERO_PAGE' undeclared (first use in this function)
     204 |                 count_vm_event(THP_SPLIT_REMAP_READONLY_ZERO_PAGE);
         |                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   mm/migrate.c:204:32: note: each undeclared identifier is reported only once for each function it appears in
>> mm/migrate.c:209:24: error: 'THP_SPLIT_UNMAP' undeclared (first use in this function)
     209 |         count_vm_event(THP_SPLIT_UNMAP);
         |                        ^~~~~~~~~~~~~~~


vim +/THP_SPLIT_REMAP_READONLY_ZERO_PAGE +204 mm/migrate.c

   169	
   170	static bool try_to_unmap_clean(struct page_vma_mapped_walk *pvmw, struct page *page)
   171	{
   172		void *addr;
   173		bool dirty;
   174		pte_t newpte;
   175	
   176		VM_BUG_ON_PAGE(PageCompound(page), page);
   177		VM_BUG_ON_PAGE(!PageAnon(page), page);
   178		VM_BUG_ON_PAGE(!PageLocked(page), page);
   179		VM_BUG_ON_PAGE(pte_present(*pvmw->pte), page);
   180	
   181		if (PageMlocked(page) || (pvmw->vma->vm_flags & VM_LOCKED))
   182			return false;
   183	
   184		/*
   185		 * The pmd entry mapping the old thp was flushed and the pte mapping
   186		 * this subpage has been non present. Therefore, this subpage is
   187		 * inaccessible. We don't need to remap it if it contains only zeros.
   188		 */
   189		addr = kmap_local_page(page);
   190		dirty = memchr_inv(addr, 0, PAGE_SIZE);
   191		kunmap_local(addr);
   192	
   193		if (dirty)
   194			return false;
   195	
   196		pte_clear_not_present_full(pvmw->vma->vm_mm, pvmw->address, pvmw->pte, false);
   197	
   198		if (userfaultfd_armed(pvmw->vma)) {
   199			newpte = pte_mkspecial(pfn_pte(page_to_pfn(ZERO_PAGE(pvmw->address)),
   200						       pvmw->vma->vm_page_prot));
   201			ptep_clear_flush(pvmw->vma, pvmw->address, pvmw->pte);
   202			set_pte_at(pvmw->vma->vm_mm, pvmw->address, pvmw->pte, newpte);
   203			dec_mm_counter(pvmw->vma->vm_mm, MM_ANONPAGES);
 > 204			count_vm_event(THP_SPLIT_REMAP_READONLY_ZERO_PAGE);
   205			return true;
   206		}
   207	
   208		dec_mm_counter(pvmw->vma->vm_mm, mm_counter(page));
 > 209		count_vm_event(THP_SPLIT_UNMAP);
   210		return true;
   211	}
   212	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

View attachment "config" of type "text/plain" (114285 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ