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 for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202112041445.jjD0iW7P-lkp@intel.com>
Date:   Sat, 4 Dec 2021 14:04:00 +0800
From:   kernel test robot <lkp@...el.com>
To:     Nadav Amit <namit@...are.com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Mike Kravetz <mike.kravetz@...cle.com>
Subject: include/asm-generic/tlb.h:530:42: sparse: sparse: cast truncates
 bits from constant value (200000000 becomes 0)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   12119cfa1052d512a92524e90ebee85029a918f8
commit: a4a118f2eead1d6c49e00765de89878288d4b890 hugetlbfs: flush TLBs correctly after huge_pmd_unshare
date:   11 days ago
config: sparc-allmodconfig (https://download.01.org/0day-ci/archive/20211204/202112041445.jjD0iW7P-lkp@intel.com/config)
compiler: sparc64-linux-gcc (GCC) 11.2.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # apt-get install sparse
        # sparse version: v0.6.4-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=a4a118f2eead1d6c49e00765de89878288d4b890
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout a4a118f2eead1d6c49e00765de89878288d4b890
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=sparc SHELL=/bin/bash

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


sparse warnings: (new ones prefixed by >>)
   mm/hugetlb.c:454:12: sparse: sparse: context imbalance in 'allocate_file_region_entries' - wrong count at exit
   mm/hugetlb.c:527:13: sparse: sparse: context imbalance in 'region_add' - wrong count at exit
   mm/hugetlb.c:594:13: sparse: sparse: context imbalance in 'region_chg' - wrong count at exit
   mm/hugetlb.c: note: in included file:
   include/linux/mm.h:1386:17: sparse: sparse: context imbalance in 'demote_free_huge_page' - unexpected unlock
   mm/hugetlb.c:4877:20: sparse: sparse: context imbalance in 'move_huge_pte' - different lock contexts for basic block
   mm/hugetlb.c: note: in included file (through arch/sparc/include/asm/tlb_64.h, arch/sparc/include/asm/tlb.h):
>> include/asm-generic/tlb.h:530:42: sparse: sparse: cast truncates bits from constant value (200000000 becomes 0)
   mm/hugetlb.c: note: in included file:
   include/linux/mm.h:1199:22: sparse: sparse: context imbalance in 'hugetlb_cow' - unexpected unlock
   mm/hugetlb.c:6006:25: sparse: sparse: context imbalance in 'follow_hugetlb_page' - different lock contexts for basic block

vim +530 include/asm-generic/tlb.h

2631ed00b04988 Peter Zijlstra (Intel  2020-06-25  526) 
2631ed00b04988 Peter Zijlstra (Intel  2020-06-25  527) static inline void tlb_flush_pmd_range(struct mmu_gather *tlb,
2631ed00b04988 Peter Zijlstra (Intel  2020-06-25  528) 				     unsigned long address, unsigned long size)
2631ed00b04988 Peter Zijlstra (Intel  2020-06-25  529) {
2631ed00b04988 Peter Zijlstra (Intel  2020-06-25 @530) 	__tlb_adjust_range(tlb, address, size);
2631ed00b04988 Peter Zijlstra (Intel  2020-06-25  531) 	tlb->cleared_pmds = 1;
2631ed00b04988 Peter Zijlstra (Intel  2020-06-25  532) }
2631ed00b04988 Peter Zijlstra (Intel  2020-06-25  533) 

:::::: The code at line 530 was first introduced by commit
:::::: 2631ed00b0498810f8d5c2163c6b5270d893687b tlb: mmu_gather: add tlb_flush_*_range APIs

:::::: TO: Peter Zijlstra (Intel) <peterz@...radead.org>
:::::: CC: Catalin Marinas <catalin.marinas@....com>

---
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