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>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CANRm+CzfHgt50k4sHAhtzqaVqUJKLXrbvVxftiO8XjFJ3hqbxA@mail.gmail.com>
Date:   Mon, 27 Nov 2017 09:26:29 +0800
From:   Wanpeng Li <kernellwp@...il.com>
To:     kbuild test robot <lkp@...el.com>
Cc:     kbuild-all@...org,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        kvm <kvm@...r.kernel.org>, Paolo Bonzini <pbonzini@...hat.com>,
        Radim Krčmář <rkrcmar@...hat.com>,
        Wanpeng Li <wanpeng.li@...mail.com>
Subject: Re: [PATCH v2] KVM: X86: Fix softlockup when get the current kvmclock timestamp

2017-11-25 11:14 GMT+08:00 kbuild test robot <lkp@...el.com>:
> Hi,
>
> Thank you for the patch! Perhaps something to improve:
>
> [auto build test WARNING on kvm/linux-next]
> [also build test WARNING on v4.14 next-20171124]
> [if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

Don't worry, the version which has already been merged doesn't have this issue.

Regards,
Wanpeng Li

>
> url:    https://github.com/0day-ci/linux/commits/Wanpeng-Li/KVM-X86-Fix-softlockup-when-get-the-current-kvmclock-timestamp/20171109-030841
> base:   https://git.kernel.org/pub/scm/virt/kvm/kvm.git linux-next
> config: i386-allyesconfig (attached as .config)
> compiler: gcc-7 (Debian 7.2.0-12) 7.2.1 20171025
> reproduce:
>         # save the attached .config to linux build tree
>         make ARCH=i386
>
> Note: it may well be a FALSE warning. FWIW you are at least aware of it now.
> http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings
>
> All warnings (new ones prefixed by >>):
>
>    In file included from arch/x86/kvm/x86.h:7:0,
>                     from arch/x86/kvm/x86.c:28:
>    arch/x86/kvm/x86.c: In function 'get_kvmclock_ns':
>>> arch/x86/include/asm/pvclock.h:93:15: warning: '*((void *)&hv_clock+28)' may be used uninitialized in this function [-Wmaybe-uninitialized]
>      u64 offset = pvclock_scale_delta(delta, src->tsc_to_system_mul,
>                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>               src->tsc_shift);
>               ~~~~~~~~~~~~~~~
>    arch/x86/kvm/x86.c:1785:32: note: '*((void *)&hv_clock+28)' was declared here
>      struct pvclock_vcpu_time_info hv_clock;
>                                    ^~~~~~~~
>    In file included from arch/x86/kvm/x86.h:7:0,
>                     from arch/x86/kvm/x86.c:28:
>    arch/x86/include/asm/pvclock.h:65:2: warning: '*((void *)&hv_clock+24)' may be used uninitialized in this function [-Wmaybe-uninitialized]
>      __asm__ (
>      ^~~~~~~
>    arch/x86/kvm/x86.c:1785:32: note: '*((void *)&hv_clock+24)' was declared here
>      struct pvclock_vcpu_time_info hv_clock;
>                                    ^~~~~~~~
> --
>    In file included from arch/x86//kvm/x86.h:7:0,
>                     from arch/x86//kvm/x86.c:28:
>    arch/x86//kvm/x86.c: In function 'get_kvmclock_ns':
>>> arch/x86/include/asm/pvclock.h:93:15: warning: '*((void *)&hv_clock+28)' may be used uninitialized in this function [-Wmaybe-uninitialized]
>      u64 offset = pvclock_scale_delta(delta, src->tsc_to_system_mul,
>                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>               src->tsc_shift);
>               ~~~~~~~~~~~~~~~
>    arch/x86//kvm/x86.c:1785:32: note: '*((void *)&hv_clock+28)' was declared here
>      struct pvclock_vcpu_time_info hv_clock;
>                                    ^~~~~~~~
>    In file included from arch/x86//kvm/x86.h:7:0,
>                     from arch/x86//kvm/x86.c:28:
>    arch/x86/include/asm/pvclock.h:65:2: warning: '*((void *)&hv_clock+24)' may be used uninitialized in this function [-Wmaybe-uninitialized]
>      __asm__ (
>      ^~~~~~~
>    arch/x86//kvm/x86.c:1785:32: note: '*((void *)&hv_clock+24)' was declared here
>      struct pvclock_vcpu_time_info hv_clock;
>                                    ^~~~~~~~
>
> vim +93 arch/x86/include/asm/pvclock.h
>
> 347bb4448 Zachary Amsden  2010-08-19  88
> dce2db0a3 Marcelo Tosatti 2012-11-27  89  static __always_inline
> a5a1d1c29 Thomas Gleixner 2016-12-21  90  u64 __pvclock_read_cycles(const struct pvclock_vcpu_time_info *src, u64 tsc)
> dce2db0a3 Marcelo Tosatti 2012-11-27  91  {
> 108b249c4 Paolo Bonzini   2016-09-01  92        u64 delta = tsc - src->tsc_timestamp;
> a5a1d1c29 Thomas Gleixner 2016-12-21 @93        u64 offset = pvclock_scale_delta(delta, src->tsc_to_system_mul,
> f7550d076 Minfei Huang    2016-05-27  94                                             src->tsc_shift);
> 3aed64f6d Paolo Bonzini   2016-06-09  95        return src->system_time + offset;
> dce2db0a3 Marcelo Tosatti 2012-11-27  96  }
> dce2db0a3 Marcelo Tosatti 2012-11-27  97
>
> :::::: The code at line 93 was first introduced by commit
> :::::: a5a1d1c2914b5316924c7893eb683a5420ebd3be clocksource: Use a plain u64 instead of cycle_t
>
> :::::: TO: Thomas Gleixner <tglx@...utronix.de>
> :::::: CC: Thomas Gleixner <tglx@...utronix.de>
>
> ---
> 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