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]
Message-ID: <20190619171249.GG1203@linux.intel.com>
Date:   Wed, 19 Jun 2019 10:12:49 -0700
From:   Sean Christopherson <sean.j.christopherson@...el.com>
To:     Borislav Petkov <bp@...en8.de>
Cc:     Qian Cai <cai@....pw>, tglx@...utronix.de, mingo@...hat.com,
        hpa@...or.com, x86@...nel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] x86/cacheinfo: fix a -Wtype-limits warning

On Wed, Jun 19, 2019 at 07:01:27PM +0200, Borislav Petkov wrote:
> On Wed, Jun 05, 2019 at 01:07:04PM -0700, Sean Christopherson wrote:
> > Might be worth calling out in the changelog that 'c->x86 == 0x17' is true
> > if and only if c->x86_model was explicitly set by cpu_detect(), i.e. the
> > patch is correct even if the original intent was a misguided attempt to
> > check that x86_model has been set.
> 
> Are you thinking about some sick virt scenario where base CPUID level is < 1?

Ha, no.  My comment was that it'd be worth explaining that the original
'c->x86_model >= 0' check was completely bogus, even if the intent was
something like 'c->x86_model != 0'.

> In this particular case, there's a guard at the beginning of
> cacheinfo_amd_init_llc_id():
> 
>         if (!cpuid_edx(0x80000006))
>                 return;
> 
> but if there's CPUs which have CPUID 0x80000006 but base CPUID level is
> < 1, then that's their problem.
> 
> -- 
> Regards/Gruss,
>     Boris.
> 
> Good mailing practices for 400: avoid top-posting and trim the reply.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ