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>] [day] [month] [year] [list]
Message-ID: <202202231420.BvLSwH9N-lkp@intel.com>
Date:   Wed, 23 Feb 2022 14:52:51 +0800
From:   kernel test robot <lkp@...el.com>
To:     David Hildenbrand <david@...hat.com>
Cc:     llvm@...ts.linux.dev, kbuild-all@...ts.01.org,
        linux-kernel@...r.kernel.org
Subject: [davidhildenbrand:cow_fixes_part_2 11/25]
 mm/memory-failure.c:1465:19: warning: parameter 'page_flags' set but not
 used

tree:   git://github.com/davidhildenbrand/linux cow_fixes_part_2
head:   f818ce6b393017761287bf06620a25d322639053
commit: 6a6823bd941bee73b1a65936f6d2c70d2c3bc086 [11/25] mm/page-flags: reuse PG_slab as PG_anon_exclusive for PageAnon() pages
config: i386-randconfig-a012-20220221 (https://download.01.org/0day-ci/archive/20220223/202202231420.BvLSwH9N-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project d271fc04d5b97b12e6b797c6067d3c96a8d7470e)
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/davidhildenbrand/linux/commit/6a6823bd941bee73b1a65936f6d2c70d2c3bc086
        git remote add davidhildenbrand git://github.com/davidhildenbrand/linux
        git fetch --no-tags davidhildenbrand cow_fixes_part_2
        git checkout 6a6823bd941bee73b1a65936f6d2c70d2c3bc086
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash

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

All warnings (new ones prefixed by >>):

>> mm/memory-failure.c:1465:19: warning: parameter 'page_flags' set but not used [-Wunused-but-set-parameter]
                                   unsigned long page_flags)
                                                 ^
   1 warning generated.


vim +/page_flags +1465 mm/memory-failure.c

6a46079cf57a7f7 Andi Kleen        2009-09-16  1463  
0348d2ebec9b00e Naoya Horiguchi   2017-07-10  1464  static int identify_page_state(unsigned long pfn, struct page *p,
0348d2ebec9b00e Naoya Horiguchi   2017-07-10 @1465  				unsigned long page_flags)
761ad8d7c7b5485 Naoya Horiguchi   2017-07-10  1466  {
761ad8d7c7b5485 Naoya Horiguchi   2017-07-10  1467  	struct page_state *ps;
0348d2ebec9b00e Naoya Horiguchi   2017-07-10  1468  
0348d2ebec9b00e Naoya Horiguchi   2017-07-10  1469  	/*
0348d2ebec9b00e Naoya Horiguchi   2017-07-10  1470  	 * The first check uses the current page flags which may not have any
0348d2ebec9b00e Naoya Horiguchi   2017-07-10  1471  	 * relevant information. The second check with the saved page flags is
0348d2ebec9b00e Naoya Horiguchi   2017-07-10  1472  	 * carried out only if the first check can't determine the page status.
6a6823bd941bee7 David Hildenbrand 2021-12-20  1473  	 *
6a6823bd941bee7 David Hildenbrand 2021-12-20  1474  	 * Note that PG_slab is also used as PG_anon_exclusive for PageAnon()
6a6823bd941bee7 David Hildenbrand 2021-12-20  1475  	 * pages. Most of these pages should have been handled previously,
6a6823bd941bee7 David Hildenbrand 2021-12-20  1476  	 * however, let's play safe and verify via PageAnon().
0348d2ebec9b00e Naoya Horiguchi   2017-07-10  1477  	 */
6a6823bd941bee7 David Hildenbrand 2021-12-20  1478  	for (ps = error_states;; ps++) {
6a6823bd941bee7 David Hildenbrand 2021-12-20  1479  		if ((p->flags & ps->mask) != ps->res)
6a6823bd941bee7 David Hildenbrand 2021-12-20  1480  			continue;
6a6823bd941bee7 David Hildenbrand 2021-12-20  1481  		if ((ps->type == MF_MSG_SLAB) && PageAnon(p))
6a6823bd941bee7 David Hildenbrand 2021-12-20  1482  			continue;
0348d2ebec9b00e Naoya Horiguchi   2017-07-10  1483  		break;
6a6823bd941bee7 David Hildenbrand 2021-12-20  1484  	}
0348d2ebec9b00e Naoya Horiguchi   2017-07-10  1485  
0348d2ebec9b00e Naoya Horiguchi   2017-07-10  1486  	page_flags |= (p->flags & (1UL << PG_dirty));
0348d2ebec9b00e Naoya Horiguchi   2017-07-10  1487  
0348d2ebec9b00e Naoya Horiguchi   2017-07-10  1488  	if (!ps->mask)
6a6823bd941bee7 David Hildenbrand 2021-12-20  1489  		for (ps = error_states;; ps++) {
6a6823bd941bee7 David Hildenbrand 2021-12-20  1490  			if ((p->flags & ps->mask) != ps->res)
6a6823bd941bee7 David Hildenbrand 2021-12-20  1491  				continue;
6a6823bd941bee7 David Hildenbrand 2021-12-20  1492  			if ((ps->type == MF_MSG_SLAB) && PageAnon(p))
6a6823bd941bee7 David Hildenbrand 2021-12-20  1493  				continue;
0348d2ebec9b00e Naoya Horiguchi   2017-07-10  1494  			break;
6a6823bd941bee7 David Hildenbrand 2021-12-20  1495  		}
0348d2ebec9b00e Naoya Horiguchi   2017-07-10  1496  	return page_action(ps, p, pfn);
0348d2ebec9b00e Naoya Horiguchi   2017-07-10  1497  }
0348d2ebec9b00e Naoya Horiguchi   2017-07-10  1498  

:::::: The code at line 1465 was first introduced by commit
:::::: 0348d2ebec9b00ea87b42dffdb3f393007303b82 mm: hwpoison: introduce idenfity_page_state

:::::: TO: Naoya Horiguchi <n-horiguchi@...jp.nec.com>
:::::: CC: Linus Torvalds <torvalds@...ux-foundation.org>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ