Re: [kvm:queue 63/66] arch/x86/kvm/x86.c:4748:69: sparse: Using plain integer as NULL pointer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2017-12-14 19:52 GMT+08:00 kbuild test robot <fengguang.wu@xxxxxxxxx>:
> tree:   https://git.kernel.org/pub/scm/virt/kvm/kvm.git queue
> head:   9943a6eb21d255cf7c166881c6cdcc7d4c0c6dda
> commit: ead301b2c67a80b44d8a9968918421f215d8803d [63/66] KVM: X86: Fix stack-out-of-bounds read in write_mmio
> reproduce:
>         # apt-get install sparse
>         git checkout ead301b2c67a80b44d8a9968918421f215d8803d
>         make ARCH=x86_64 allmodconfig
>         make C=1 CF=-D__CHECK_ENDIAN__
>
>
> sparse warnings: (new ones prefixed by >>)

Thanks for the report, I will fix it.

Regards,
Wanpeng Li

>
>
> vim +4748 arch/x86/kvm/x86.c
>
> 77d197b2 Xiao Guangrong 2011-07-13  4744
> 77d197b2 Xiao Guangrong 2011-07-13  4745  static int read_exit_mmio(struct kvm_vcpu *vcpu, gpa_t gpa,
> 77d197b2 Xiao Guangrong 2011-07-13  4746                          void *val, int bytes)
> 77d197b2 Xiao Guangrong 2011-07-13  4747  {
> 77d197b2 Xiao Guangrong 2011-07-13 @4748        trace_kvm_mmio(KVM_TRACE_MMIO_READ_UNSATISFIED, bytes, gpa, 0);
> 77d197b2 Xiao Guangrong 2011-07-13  4749        return X86EMUL_IO_NEEDED;
> 77d197b2 Xiao Guangrong 2011-07-13  4750  }
> 77d197b2 Xiao Guangrong 2011-07-13  4751
>
> :::::: The code at line 4748 was first introduced by commit
> :::::: 77d197b2ca37b33b0461ab1e2dbe40cbe4a6fd6a KVM: x86: abstract the operation for read/write emulation
>
> :::::: TO: Xiao Guangrong <xiaoguangrong@xxxxxxxxxxxxxx>
> :::::: CC: Avi Kivity <avi@xxxxxxxxxx>
>
> ---
> 0-DAY kernel test infrastructure                Open Source Technology Center
> https://lists.01.org/pipermail/kbuild-all                   Intel Corporation



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux