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:   Tue, 10 Dec 2019 17:24:29 +0100
From:   Thomas Renninger <trenn@...e.de>
To:     Greg KH <gregkh@...uxfoundation.org>
Cc:     Will Deacon <will@...nel.org>,
        Felix Schnizlein <fschnizlein@...e.com>,
        linux-kernel@...r.kernel.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 Tuesday, December 10, 2019 3:47:37 PM CET Greg KH wrote:
> On Tue, Dec 10, 2019 at 02:33:07PM +0100, Thomas Renninger wrote:
> > On Monday, December 9, 2019 6:38:05 PM CET Will Deacon wrote:
> > > On Mon, Dec 09, 2019 at 12:28:44PM +0100, Thomas Renninger wrote:
> > > > 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
> > 
> > Again: proc is moving to sys.
> 
> No.  New stuff is to be added to /sys/, don't add new things to /proc
> unless it deals with processes.
> 
> There is no mass-migration of existing /proc files to sysfs for no good
> reason.
> 
> > You probably export feature flags in /proc/cpuinfo for a good reason.
> > So where in sysfs should this show up?
> 
> Why does it have to live in sysfs if it is already in /proc and parsed
> properly by tools?

Parsing /proc/cpuinfo is the best example why we have sysfs...
Most important things have already been ported:

microcode       : 0x10
cat /sys/devices/system/cpu/cpu1/microcode/version
0x10

physical id     : 0
siblings        : 8
core id         : 1
cpu cores       : 4
...
/sys/devices/system/cpu/cpu1/topology/

clflush size    : 64
cache_alignment : 64
...
/sys/devices/system/cpu/cpu1/cache/


Only missing important info which still is needed is family/model/stepping, 
name, bugs and flags
cpufreq also got ported to sysfs quite some time ago already.

I am aware that /proc/cpuinfo won't vanish...
...the next decade. Still I am confident I will still see this.

Still relevant info which is accessed by (newly written) userspace tools 
should read out info via sysfs.

Beside microcode, topology, cache, cpufreq,...
info, there now is also family, model, stepping, bugs, flags and name

There rest is (from my perspective) really old ugly stuff and not needed 
anymore by recent tools.


   Thomas


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ