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>] [thread-next>] [day] [month] [year] [list]
Message-ID: <201705092026.5nJ1ipH5%fengguang.wu@intel.com>
Date:   Tue, 9 May 2017 20:32:30 +0800
From:   kbuild test robot <fengguang.wu@...el.com>
To:     Paolo Bonzini <pbonzini@...hat.com>
Cc:     kbuild-all@...org, linux-kernel@...r.kernel.org,
        David Matlack <dmatlack@...gle.com>,
        Bandan Das <bsd@...hat.com>
Subject: arch/x86/include/asm/preempt.h:75:9: sparse: context imbalance in
 'vcpu_enter_guest' - unexpected unlock

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   2868b2513aa732a99ea4a0a6bf10dc93c1f3dac2
commit: bd7e5b0899a429445cc6e3037c13f8b5ae3be903 KVM: x86: remove code for lazy FPU handling
date:   3 months ago
reproduce:
        # apt-get install sparse
        git checkout bd7e5b0899a429445cc6e3037c13f8b5ae3be903
        make ARCH=x86_64 allmodconfig
        make C=1 CF=-D__CHECK_ENDIAN__


sparse warnings: (new ones prefixed by >>)

   arch/x86/kvm/x86.c:2063:38: sparse: incorrect type in argument 1 (different address spaces)
   arch/x86/kvm/x86.c:2063:38:    expected void const [noderef] <asn:1>*<noident>
   arch/x86/kvm/x86.c:2063:38:    got unsigned char [usertype] *
   arch/x86/include/asm/uaccess.h:714:18: sparse: incorrect type in argument 1 (different modifiers)
   arch/x86/include/asm/uaccess.h:714:18:    expected void *<noident>
   arch/x86/include/asm/uaccess.h:714:18:    got void const *from
   arch/x86/include/asm/uaccess.h:714:18: sparse: incorrect type in argument 1 (different modifiers)
   arch/x86/include/asm/uaccess.h:714:18:    expected void *<noident>
   arch/x86/include/asm/uaccess.h:714:18:    got void const *from
   arch/x86/include/asm/uaccess.h:714:18: sparse: incorrect type in argument 1 (different modifiers)
   arch/x86/include/asm/uaccess.h:714:18:    expected void *<noident>
   arch/x86/include/asm/uaccess.h:714:18:    got void const *from
   arch/x86/include/asm/uaccess.h:714:18: sparse: incorrect type in argument 1 (different modifiers)
   arch/x86/include/asm/uaccess.h:714:18:    expected void *<noident>
   arch/x86/include/asm/uaccess.h:714:18:    got void const *from
   arch/x86/include/asm/uaccess.h:714:18: sparse: incorrect type in argument 1 (different modifiers)
   arch/x86/include/asm/uaccess.h:714:18:    expected void *<noident>
   arch/x86/include/asm/uaccess.h:714:18:    got void const *from
   arch/x86/include/asm/uaccess.h:714:18: sparse: incorrect type in argument 1 (different modifiers)
   arch/x86/include/asm/uaccess.h:714:18:    expected void *<noident>
   arch/x86/include/asm/uaccess.h:714:18:    got void const *from
   arch/x86/include/asm/uaccess.h:714:18: sparse: incorrect type in argument 1 (different modifiers)
   arch/x86/include/asm/uaccess.h:714:18:    expected void *<noident>
   arch/x86/include/asm/uaccess.h:714:18:    got void const *from
   arch/x86/include/asm/uaccess.h:714:18: sparse: incorrect type in argument 1 (different modifiers)
   arch/x86/include/asm/uaccess.h:714:18:    expected void *<noident>
   arch/x86/include/asm/uaccess.h:714:18:    got void const *from
   arch/x86/include/asm/uaccess.h:714:18: sparse: incorrect type in argument 1 (different modifiers)
   arch/x86/include/asm/uaccess.h:714:18:    expected void *<noident>
   arch/x86/include/asm/uaccess.h:714:18:    got void const *from
   arch/x86/include/asm/uaccess.h:714:18: sparse: incorrect type in argument 1 (different modifiers)
   arch/x86/include/asm/uaccess.h:714:18:    expected void *<noident>
   arch/x86/include/asm/uaccess.h:714:18:    got void const *from
   arch/x86/include/asm/uaccess.h:714:18: sparse: incorrect type in argument 1 (different modifiers)
   arch/x86/include/asm/uaccess.h:714:18:    expected void *<noident>
   arch/x86/include/asm/uaccess.h:714:18:    got void const *from
   arch/x86/include/asm/uaccess.h:714:18: sparse: incorrect type in argument 1 (different modifiers)
   arch/x86/include/asm/uaccess.h:714:18:    expected void *<noident>
   arch/x86/include/asm/uaccess.h:714:18:    got void const *from
   arch/x86/include/asm/uaccess.h:714:18: sparse: incorrect type in argument 1 (different modifiers)
   arch/x86/include/asm/uaccess.h:714:18:    expected void *<noident>
   arch/x86/include/asm/uaccess.h:714:18:    got void const *from
   arch/x86/include/asm/uaccess.h:714:18: sparse: incorrect type in argument 1 (different modifiers)
   arch/x86/include/asm/uaccess.h:714:18:    expected void *<noident>
   arch/x86/include/asm/uaccess.h:714:18:    got void const *from
   arch/x86/include/asm/uaccess.h:714:18: sparse: incorrect type in argument 1 (different modifiers)
   arch/x86/include/asm/uaccess.h:714:18:    expected void *<noident>
   arch/x86/include/asm/uaccess.h:714:18:    got void const *from
   arch/x86/include/asm/uaccess.h:714:18: sparse: incorrect type in argument 1 (different modifiers)
   arch/x86/include/asm/uaccess.h:714:18:    expected void *<noident>
   arch/x86/include/asm/uaccess.h:714:18:    got void const *from
   arch/x86/include/asm/uaccess.h:714:18: sparse: incorrect type in argument 1 (different modifiers)
   arch/x86/include/asm/uaccess.h:714:18:    expected void *<noident>
   arch/x86/include/asm/uaccess.h:714:18:    got void const *from
   ./arch/x86/kvm/trace.h:63:1: sparse: odd constant _Bool cast (ffffffffffffffff becomes 1)
   ./arch/x86/kvm/trace.h:378:1: sparse: odd constant _Bool cast (ffffffffffffffff becomes 1)
   ./arch/x86/kvm/trace.h:497:1: sparse: odd constant _Bool cast (ffffffffffffffff becomes 1)
   ./arch/x86/kvm/trace.h:763:1: sparse: odd constant _Bool cast (ffffffffffffffff becomes 1)
   ./arch/x86/kvm/trace.h:763:1: sparse: odd constant _Bool cast (ffffffffffffffff becomes 1)
   ./arch/x86/kvm/trace.h:814:1: sparse: odd constant _Bool cast (ffffffffffffffff becomes 1)
   ./arch/x86/kvm/trace.h:814:1: sparse: odd constant _Bool cast (ffffffffffffffff becomes 1)
   ./arch/x86/kvm/trace.h:836:1: sparse: odd constant _Bool cast (ffffffffffffffff becomes 1)
   ./arch/x86/kvm/trace.h:886:1: sparse: odd constant _Bool cast (ffffffffffffffff becomes 1)
   ./arch/x86/kvm/trace.h:972:1: sparse: odd constant _Bool cast (ffffffffffffffff becomes 1)
   ./arch/x86/kvm/trace.h:997:1: sparse: odd constant _Bool cast (ffffffffffffffff becomes 1)
   ./arch/x86/kvm/trace.h:1102:1: sparse: odd constant _Bool cast (ffffffffffffffff becomes 1)
   ./arch/x86/kvm/trace.h:1127:1: sparse: odd constant _Bool cast (ffffffffffffffff becomes 1)
   ./arch/x86/kvm/trace.h:1153:1: sparse: odd constant _Bool cast (ffffffffffffffff becomes 1)
   ./arch/x86/kvm/trace.h:1322:1: sparse: odd constant _Bool cast (ffffffffffffffff becomes 1)
   ./arch/x86/kvm/trace.h:1322:1: sparse: odd constant _Bool cast (ffffffffffffffff becomes 1)
>> arch/x86/include/asm/preempt.h:75:9: sparse: context imbalance in 'vcpu_enter_guest' - unexpected unlock

vim +/vcpu_enter_guest +75 arch/x86/include/asm/preempt.h

c2daa3be Peter Zijlstra    2013-08-14  59  static __always_inline void clear_preempt_need_resched(void)
c2daa3be Peter Zijlstra    2013-08-14  60  {
b3ca1c10 Christoph Lameter 2014-04-07  61  	raw_cpu_or_4(__preempt_count, PREEMPT_NEED_RESCHED);
c2daa3be Peter Zijlstra    2013-08-14  62  }
c2daa3be Peter Zijlstra    2013-08-14  63  
c2daa3be Peter Zijlstra    2013-08-14  64  static __always_inline bool test_preempt_need_resched(void)
c2daa3be Peter Zijlstra    2013-08-14  65  {
b3ca1c10 Christoph Lameter 2014-04-07  66  	return !(raw_cpu_read_4(__preempt_count) & PREEMPT_NEED_RESCHED);
c2daa3be Peter Zijlstra    2013-08-14  67  }
c2daa3be Peter Zijlstra    2013-08-14  68  
c2daa3be Peter Zijlstra    2013-08-14  69  /*
c2daa3be Peter Zijlstra    2013-08-14  70   * The various preempt_count add/sub methods
c2daa3be Peter Zijlstra    2013-08-14  71   */
c2daa3be Peter Zijlstra    2013-08-14  72  
c2daa3be Peter Zijlstra    2013-08-14  73  static __always_inline void __preempt_count_add(int val)
c2daa3be Peter Zijlstra    2013-08-14  74  {
b3ca1c10 Christoph Lameter 2014-04-07 @75  	raw_cpu_add_4(__preempt_count, val);
c2daa3be Peter Zijlstra    2013-08-14  76  }
c2daa3be Peter Zijlstra    2013-08-14  77  
c2daa3be Peter Zijlstra    2013-08-14  78  static __always_inline void __preempt_count_sub(int val)
c2daa3be Peter Zijlstra    2013-08-14  79  {
b3ca1c10 Christoph Lameter 2014-04-07  80  	raw_cpu_add_4(__preempt_count, -val);
c2daa3be Peter Zijlstra    2013-08-14  81  }
c2daa3be Peter Zijlstra    2013-08-14  82  
ba1f14fb Peter Zijlstra    2013-11-28  83  /*

:::::: The code at line 75 was first introduced by commit
:::::: b3ca1c10d7b32fdfdfaf5484eda486323f52d9be percpu: add raw_cpu_ops

:::::: TO: Christoph Lameter <cl@...ux.com>
:::::: CC: Linus Torvalds <torvalds@...ux-foundation.org>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ