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: <202012270354.t84O0jvZ-lkp@intel.com>
Date:   Sun, 27 Dec 2020 03:01:58 +0800
From:   kernel test robot <lkp@...el.com>
To:     Andrew Jones <drjones@...hat.com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Marc Zyngier <maz@...nel.org>
Subject: arch/arm64/kvm/pvtime.c:27:25: sparse: sparse: cast to restricted
 __le64

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   f838f8d2b694cf9d524dc4423e9dd2db13892f3f
commit: 53f985584e3c2ebe5f2455530fbf87a001528db8 KVM: arm64: pvtime: Fix stolen time accounting across migration
date:   4 months ago
config: arm64-randconfig-s032-20201223 (attached as .config)
compiler: aarch64-linux-gcc (GCC) 9.3.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.3-184-g1b896707-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=53f985584e3c2ebe5f2455530fbf87a001528db8
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 53f985584e3c2ebe5f2455530fbf87a001528db8
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=arm64 

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 >>)"
>> arch/arm64/kvm/pvtime.c:27:25: sparse: sparse: cast to restricted __le64
>> arch/arm64/kvm/pvtime.c:27:25: sparse: sparse: cast to restricted __le64
>> arch/arm64/kvm/pvtime.c:27:25: sparse: sparse: cast to restricted __le64
>> arch/arm64/kvm/pvtime.c:27:25: sparse: sparse: cast to restricted __le64
>> arch/arm64/kvm/pvtime.c:27:25: sparse: sparse: cast to restricted __le64
>> arch/arm64/kvm/pvtime.c:27:25: sparse: sparse: cast to restricted __le64
>> arch/arm64/kvm/pvtime.c:27:25: sparse: sparse: cast to restricted __le64
>> arch/arm64/kvm/pvtime.c:27:25: sparse: sparse: cast to restricted __le64
>> arch/arm64/kvm/pvtime.c:27:25: sparse: sparse: cast to restricted __le64
>> arch/arm64/kvm/pvtime.c:27:25: sparse: sparse: cast to restricted __le64

vim +27 arch/arm64/kvm/pvtime.c

    12	
    13	void kvm_update_stolen_time(struct kvm_vcpu *vcpu)
    14	{
    15		struct kvm *kvm = vcpu->kvm;
    16		u64 base = vcpu->arch.steal.base;
    17		u64 last_steal = vcpu->arch.steal.last_steal;
    18		u64 offset = offsetof(struct pvclock_vcpu_stolen_time, stolen_time);
    19		u64 steal = 0;
    20		int idx;
    21	
    22		if (base == GPA_INVALID)
    23			return;
    24	
    25		idx = srcu_read_lock(&kvm->srcu);
    26		if (!kvm_get_guest(kvm, base + offset, steal)) {
  > 27			steal = le64_to_cpu(steal);
    28			vcpu->arch.steal.last_steal = READ_ONCE(current->sched_info.run_delay);
    29			steal += vcpu->arch.steal.last_steal - last_steal;
    30			kvm_put_guest(kvm, base + offset, cpu_to_le64(steal));
    31		}
    32		srcu_read_unlock(&kvm->srcu, idx);
    33	}
    34	

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

Download attachment ".config.gz" of type "application/gzip" (47300 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ