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: <202412280419.RvjGqzaD-lkp@intel.com>
Date: Sat, 28 Dec 2024 05:15:18 +0800
From: kernel test robot <lkp@...el.com>
To: Will Deacon <will@...nel.org>
Cc: oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: mm/migrate.c:236:33: sparse: sparse: cast to non-scalar

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   8379578b11d5e073792b5db2690faa12effce8e0
commit: dee081bf8f824cabeb7c7495367d5dad0a444eb1 READ_ONCE: Drop pointer qualifiers when reading from scalar types
date:   4 years, 8 months ago
config: alpha-randconfig-r121-20241225 (https://download.01.org/0day-ci/archive/20241228/202412280419.RvjGqzaD-lkp@intel.com/config)
compiler: alpha-linux-gcc (GCC) 14.2.0
reproduce: (https://download.01.org/0day-ci/archive/20241228/202412280419.RvjGqzaD-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 <lkp@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202412280419.RvjGqzaD-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
>> mm/migrate.c:236:33: sparse: sparse: cast to non-scalar
>> mm/migrate.c:236:33: sparse: sparse: cast from non-scalar
   mm/migrate.c:824:9: sparse: sparse: context imbalance in '__buffer_migrate_page' - different lock contexts for basic block

vim +236 mm/migrate.c

616b8371539a6c Zi Yan             2017-09-08  234  
0697212a411c1d Christoph Lameter  2006-06-23  235  		get_page(new);
6d2329f8872f23 Andrea Arcangeli   2016-10-07 @236  		pte = pte_mkold(mk_pte(new, READ_ONCE(vma->vm_page_prot)));
3fe87967c536e8 Kirill A. Shutemov 2017-02-24  237  		if (pte_swp_soft_dirty(*pvmw.pte))
c3d16e16522fe3 Cyrill Gorcunov    2013-10-16  238  			pte = pte_mksoft_dirty(pte);
d3cb8bf6081b8b Mel Gorman         2014-10-02  239  
3fe87967c536e8 Kirill A. Shutemov 2017-02-24  240  		/*
3fe87967c536e8 Kirill A. Shutemov 2017-02-24  241  		 * Recheck VMA as permissions can change since migration started
3fe87967c536e8 Kirill A. Shutemov 2017-02-24  242  		 */
3fe87967c536e8 Kirill A. Shutemov 2017-02-24  243  		entry = pte_to_swp_entry(*pvmw.pte);
0697212a411c1d Christoph Lameter  2006-06-23  244  		if (is_write_migration_entry(entry))
d3cb8bf6081b8b Mel Gorman         2014-10-02  245  			pte = maybe_mkwrite(pte, vma);
f45ec5ff16a75f Peter Xu           2020-04-06  246  		else if (pte_swp_uffd_wp(*pvmw.pte))
f45ec5ff16a75f Peter Xu           2020-04-06  247  			pte = pte_mkuffd_wp(pte);
d3cb8bf6081b8b Mel Gorman         2014-10-02  248  
df6ad69838fc9d Jérôme Glisse      2017-09-08  249  		if (unlikely(is_zone_device_page(new))) {
df6ad69838fc9d Jérôme Glisse      2017-09-08  250  			if (is_device_private_page(new)) {
a5430dda8a3a1c Jérôme Glisse      2017-09-08  251  				entry = make_device_private_entry(new, pte_write(pte));
a5430dda8a3a1c Jérôme Glisse      2017-09-08  252  				pte = swp_entry_to_pte(entry);
f45ec5ff16a75f Peter Xu           2020-04-06  253  				if (pte_swp_uffd_wp(*pvmw.pte))
f45ec5ff16a75f Peter Xu           2020-04-06  254  					pte = pte_mkuffd_wp(pte);
df6ad69838fc9d Jérôme Glisse      2017-09-08  255  			}
d2b2c6dd227ba5 Lars Persson       2019-03-28  256  		}
a5430dda8a3a1c Jérôme Glisse      2017-09-08  257  

:::::: The code at line 236 was first introduced by commit
:::::: 6d2329f8872f23e46a19d240930571510ce525eb mm: vm_page_prot: update with WRITE_ONCE/READ_ONCE

:::::: TO: Andrea Arcangeli <aarcange@...hat.com>
:::::: CC: Linus Torvalds <torvalds@...ux-foundation.org>

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ