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] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 1 Dec 2023 14:10:51 +0800
From:   Yujie Liu <yujie.liu@...el.com>
To:     Sean Christopherson <seanjc@...gle.com>
CC:     Vitaly Kuznetsov <vkuznets@...hat.com>,
        kernel test robot <lkp@...el.com>,
        <oe-kbuild-all@...ts.linux.dev>, <linux-kernel@...r.kernel.org>,
        "Paolo Bonzini" <pbonzini@...hat.com>, <kvm@...r.kernel.org>
Subject: Re: arch/x86/kvm/vmx/hyperv.h:79:30: sparse: sparse: cast truncates
 bits from constant value (1b009b becomes 9b)

On Thu, Nov 30, 2023 at 09:49:43AM -0800, Sean Christopherson wrote:
> On Thu, Nov 30, 2023, Vitaly Kuznetsov wrote:
> > kernel test robot <lkp@...el.com> writes:
> > 
> > > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> > > head:   3b47bc037bd44f142ac09848e8d3ecccc726be99
> > > commit: a789aeba419647c44d7e7320de20fea037c211d0 KVM: VMX: Rename "vmx/evmcs.{ch}" to "vmx/hyperv.{ch}"
> > > date:   1 year ago
> > > config: x86_64-randconfig-123-20231130 (https://download.01.org/0day-ci/archive/20231130/202311302231.sinLrAig-lkp@intel.com/config)
> > > compiler: clang version 16.0.4 (https://github.com/llvm/llvm-project.git ae42196bc493ffe877a7e3dff8be32035dea4d07)
> > > reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231130/202311302231.sinLrAig-lkp@intel.com/reproduce)
> > >
> > > If you fix the issue in a separate patch/commit (i.e. not just a new version of
> > > the same patch/commit), kindly add following tags
> > > | Reported-by: kernel test robot <lkp@...el.com>
> > > | Closes: https://lore.kernel.org/oe-kbuild-all/202311302231.sinLrAig-lkp@intel.com/
> > >
> > > sparse warnings: (new ones prefixed by >>)
> > >    arch/x86/kvm/vmx/hyperv.h:79:30: sparse: sparse: cast truncates bits from constant value (a000a becomes a)
> > 
> > This is what ROL16() macro does but the thing is: we actually want to
> > truncate bits by doing an explicit (u16) cast. We can probably replace
> > this with '& 0xffff':
> > 
> > #define ROL16(val, n) ((((u16)(val) << (n)) | ((u16)(val) >> (16 - (n)))) & 0xffff)
> > 
> > but honestly I don't see much point...
> 
> Yeah, just ignore 'em, we get the exact same sparse complaints in vmcs12.c and
> have had great success ignoring those too :-)

Thanks for the information. We've disabled this warning in the bot to
avoid sending reports against other files with similar code.

Best Regards,
Yujie

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ