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-next>] [day] [month] [year] [list]
Date:   Fri, 20 Mar 2020 14:13:45 +0100
From:   Thomas Gleixner <tglx@...utronix.de>
To:     LKML <linux-kernel@...r.kernel.org>
Cc:     x86@...nel.org, Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Mark Gross <mgross@...ux.intel.com>,
        Tony Luck <tony.luck@...el.com>,
        Paolo Bonzini <pbonzini@...hat.com>,
        Darren Hart <dvhart@...radead.org>,
        Andy Shevchenko <andy@...radead.org>,
        "Rafael J. Wysocki" <rjw@...ysocki.net>,
        Len Brown <lenb@...nel.org>, linux-acpi@...r.kernel.org,
        Viresh Kumar <viresh.kumar@...aro.org>,
        linux-pm@...r.kernel.org,
        Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>,
        linux-edac@...r.kernel.org, platform-driver-x86@...r.kernel.org,
        Jean Delvare <jdelvare@...e.com>,
        Guenter Roeck <linux@...ck-us.net>,
        linux-hwmon@...r.kernel.org, Zhang Rui <rui.zhang@...el.com>,
        Daniel Lezcano <daniel.lezcano@...aro.org>,
        Amit Kucheria <amit.kucheria@...durent.com>,
        Chanwoo Choi <cw00.choi@...sung.com>,
        Jacob Pan <jacob.jun.pan@...ux.intel.com>,
        Adrian Hunter <adrian.hunter@...el.com>,
        Ulf Hansson <ulf.hansson@...aro.org>,
        linux-mmc@...r.kernel.org, Bjorn Helgaas <bhelgaas@...gle.com>,
        linux-pci@...r.kernel.org, Takashi Iwai <tiwai@...e.com>,
        alsa-devel@...a-project.org,
        Herbert Xu <herbert@...dor.apana.org.au>,
        "David S. Miller" <davem@...emloft.net>,
        linux-crypto@...r.kernel.org
Subject: [patch 00/22] x86/treewide: Consolidate CPU match macro maze and get
 rid of C89 (sic!) initializers

The x86 CPU matching based on struct x86_cpu_id:

  - is using an inconsistent macro mess with pointlessly duplicated and
    slightly different local macros. Finding the places is an art as there
    is no consistent name space at all.

  - is still mostly based on C89 struct initializers which rely on the
    ordering of the struct members. That's proliferated forever as every
    new driver just copies the mess from some exising one.

A recent offlist conversation about adding more match criteria to the CPU
matching logic instead of creating yet another set of horrors, reminded me
of a pile of scripts and patches which I hacked on a few years ago when I
tried to add something to struct x86_cpu_id.

That stuff was finally not needed and ended up in my ever growing todo list
and collected dust and cobwebs, but (un)surprisingly enough most of it
still worked out of the box. The copy & paste machinery still works as it
did years ago.

There are a few places which needed extra care due to new creative macros,
new check combinations etc. and surprisingly ONE open coded proper C99
initializer.

It was reasonably simple to make it at least compile and pass a quick
binary equivalence check.

The result is a X86_MATCH prefix based set of macros which are reflecting
the needs of the usage sites and shorten the base macro which takes all
possible parameters (vendor, family, model, feature, data) and uses proper
C99 initializers.

So extensions of the match logic are trivial after that.

The patch set is against Linus tree and has trivial conflicts against
linux-next.

The diffstat is:
 71 files changed, 525 insertions(+), 472 deletions(-)

but the extra lines are pretty much kernel-doc documentation which I added
to each of the new macros. The usage sites diffstat is:

 70 files changed, 393 insertions(+), 471 deletions(-)

Thoughts?

Thanks,

	tglx


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ