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, 13 Oct 2017 07:30:05 +0200
From:   Ingo Molnar <mingo@...nel.org>
To:     Thomas Gleixner <tglx@...utronix.de>
Cc:     Andi Kleen <andi@...stfloor.org>, x86@...nel.org,
        linux-kernel@...r.kernel.org, Andi Kleen <ak@...ux.intel.com>,
        Jonathan McDowell <noodles@...th.li>
Subject: Re: [PATCH v9 2/5] x86/cpuid: Add generic table for cpuid
 dependencies


* Thomas Gleixner <tglx@...utronix.de> wrote:

> On Thu, 12 Oct 2017, Ingo Molnar wrote:
> > 
> > * Andi Kleen <andi@...stfloor.org> wrote:
> > 
> > > --- /dev/null
> > > +++ b/arch/x86/kernel/cpu/cpuid-deps.c
> > > @@ -0,0 +1,109 @@
> > > +/* Declare dependencies between CPUIDs */
> > > +#include <linux/kernel.h>
> > > +#include <linux/init.h>
> > > +#include <linux/module.h>
> > > +#include <asm/cpufeature.h>
> > > +
> > > +struct cpuid_dep {
> > > +	unsigned short feature;
> > > +	unsigned short depends;
> > > +};
> > 
> > Why are these 16-bit fields? 16-bit data types should be avoided as much as 
> > possible, as they generate suboptimal code.
> 
> I was looking at that as well and decided that we preferrably have a
> compressed data structure. The code which walks the table is hardly
> performance critical and the difference in text size is marginal.

So the code should all be __init (once that is fixed), hence data and text size 
literally does not matter - it gets freed.

So the only effect the 16-bit variables have is (marginally) worse boot times.

Thanks,

	Ingo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ