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: <25032400.G9DUGnJgnc@skinner.arch.suse.de>
Date:   Mon, 09 Dec 2019 12:28:44 +0100
From:   Thomas Renninger <trenn@...e.de>
To:     Will Deacon <will@...nel.org>,
        Felix Schnizlein <fschnizlein@...e.com>
Cc:     linux-kernel@...r.kernel.org, gregkh@...uxfoundation.org,
        Felix Schnizlein <fschnizlein@...e.de>,
        linux-arch@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        linux@...linux.org.uk, will.deacon@....com, x86@...nel.org
Subject: Re: [PATCH 3/3] arm64 cpuinfo: implement sysfs nodes for arm64

On Monday, December 9, 2019 11:31:11 AM CET Will Deacon wrote:
> On Fri, Dec 06, 2019 at 05:24:21PM +0100, Thomas Renninger wrote:
> > From: Felix Schnizlein <fschnizlein@...e.de>
> > 
> > Export all information from /proc/cpuinfo to sysfs:
> > implementer, architecture, variant, part, revision,
> > bogomips and flags are exported.
> > 
> > Example:
> > /sys/devices/system/cpu/cpu1/info/:[0]# head *

...

> > ==> flags <==
> > fp asimd evtstrm aes pmull sha1 sha2 crc32 cpuid asimdrdm
 
...

> I don't understand why we need this on arm64

The first intention of these patches is to port x86 /proc/cpuinfo.

Because of the divergence of /proc/cpuinfo and the totally different
info exported there across architectures,
therefore it is also tried to get a unified interface across architectures 
where possible.

So for flags and bugs this may work out, right?

For the rest, it looks like people again only had their CPU in mind and
exported to userspace what currently was needed...

> and why it's an improvement
> over all the other schemes we already support for identifying CPU features.

Sigh...

> Given the pain we've endured over the years exposing this sort of stuff to
> userspace, I'm relucant to add more just for the fun of it.

If there should ever be something like a string describing the CPU...
In x86 it comes from the CPU itself.
Maybe we get a model description at some point as well...

Or any other entity which may also get exported on other archs..

Please remember this interface and watch out whether you could export
things under the same name as done on other architectures.

I'll revert everything but flags for ARM now.
But this is the best example for the need of a generic interface:

x86 -   /proc/cpuinfo:
flags           : ...
arm64 - /proc/cpuinfo:
Features        : ...

even it is exactly the same kernel interface, even x86 flags are used 
according to arch/arm64/include/asm/cpufeature.h:

  * We use arm64_cpu_capabilities to represent system features, errata work

But it is named differently in /proc/cpuinfo.
This should not happen again in /sys/...

    Thomas


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ