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-next>] [day] [month] [year] [list]
Date:   Tue, 18 Oct 2022 18:53:17 +0800
From:   kernel test robot <lkp@...el.com>
To:     David Hildenbrand <david@...hat.com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Andrew Morton <akpm@...ux-foundation.org>,
        Linux Memory Management List <linux-mm@...ck.org>
Subject: [akpm-mm:mm-unstable 76/100] mm/ksm.c:423:5: warning: no previous
 prototype for 'break_ksm_pud_entry'

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-unstable
head:   f5938bbbb79d48ca167e305c228dccbecea0309e
commit: 268ae2f9f2a7303079739cb975348a8ede4cda1d [76/100] mm/ksm: convert break_ksm() to use walk_page_range_vma()
config: arc-randconfig-r043-20221017
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://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git/commit/?id=268ae2f9f2a7303079739cb975348a8ede4cda1d
        git remote add akpm-mm https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git
        git fetch --no-tags akpm-mm mm-unstable
        git checkout 268ae2f9f2a7303079739cb975348a8ede4cda1d
        # 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 SHELL=/bin/bash

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

All warnings (new ones prefixed by >>):

>> mm/ksm.c:423:5: warning: no previous prototype for 'break_ksm_pud_entry' [-Wmissing-prototypes]
     423 | int break_ksm_pud_entry(pud_t *pud, unsigned long addr, unsigned long next,
         |     ^~~~~~~~~~~~~~~~~~~
>> mm/ksm.c:432:5: warning: no previous prototype for 'break_ksm_pmd_entry' [-Wmissing-prototypes]
     432 | int break_ksm_pmd_entry(pmd_t *pmd, unsigned long addr, unsigned long next,
         |     ^~~~~~~~~~~~~~~~~~~


vim +/break_ksm_pud_entry +423 mm/ksm.c

   422	
 > 423	int break_ksm_pud_entry(pud_t *pud, unsigned long addr, unsigned long next,
   424				struct mm_walk *walk)
   425	{
   426		/* We only care about page tables to walk to a single base page. */
   427		if (pud_leaf(*pud) || !pud_present(*pud))
   428			return 1;
   429		return 0;
   430	}
   431	
 > 432	int break_ksm_pmd_entry(pmd_t *pmd, unsigned long addr, unsigned long next,
   433				struct mm_walk *walk)
   434	{
   435		bool *ksm_page = walk->private;
   436		struct page *page = NULL;
   437		pte_t *pte, ptent;
   438		spinlock_t *ptl;
   439	
   440		/* We only care about page tables to walk to a single base page. */
   441		if (pmd_leaf(*pmd) || !pmd_present(*pmd))
   442			return 1;
   443	
   444		/*
   445		 * We only lookup a single page (a) no need to iterate; and (b)
   446		 * always return 1 to exit immediately and not iterate in the caller.
   447		 */
   448		pte = pte_offset_map_lock(walk->mm, pmd, addr, &ptl);
   449		ptent = *pte;
   450	
   451		if (pte_none(ptent))
   452			return 1;
   453		if (!pte_present(ptent)) {
   454			swp_entry_t entry = pte_to_swp_entry(ptent);
   455	
   456			/*
   457			 * We only care about migration of KSM pages. As KSM pages
   458			 * remain KSM pages until freed, no need to wait here for
   459			 * migration to end to identify such.
   460			 */
   461			if (is_migration_entry(entry))
   462				page = pfn_swap_entry_to_page(entry);
   463		} else {
   464			page = vm_normal_page(walk->vma, addr, ptent);
   465		}
   466		if (page && PageKsm(page))
   467			*ksm_page = true;
   468		pte_unmap_unlock(pte, ptl);
   469		return 1;
   470	}
   471	

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

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ