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] [day] [month] [year] [list]
Date:   Sat, 21 Mar 2020 09:20:29 +0800
From:   YunQiang Su <wzssyqa@...il.com>
To:     "Maciej W. Rozycki" <macro@...ux-mips.org>
Cc:     Jiaxun Yang <jiaxun.yang@...goat.com>,
        Manuel Lauss <manuel.lauss@...il.com>,
        Tiezhu Yang <yangtiezhu@...ngson.cn>,
        Thomas Bogendoerfer <tsbogend@...ha.franken.de>,
        Huacai Chen <chenhc@...ote.com>,
        Linux-MIPS <linux-mips@...r.kernel.org>,
        LKML <linux-kernel@...r.kernel.org>,
        Xuefeng Li <lixuefeng@...ngson.cn>
Subject: Re: [PATCH] MIPS: Loongson: Add model name to /proc/cpuinfo

Maciej W. Rozycki <macro@...ux-mips.org> 于2020年3月21日周六 上午5:24写道:
>
> On Wed, 11 Mar 2020, Jiaxun Yang wrote:
>
> > __cpu_name[] will be displayed as "cpu model" in cpuinfo, however
> > in x86 world, the name line is started with "model name".
> > Most user applications like lscpu, hwinfo is following x86's rule, we don't have superpower to move all of them.
> >
> > Also rename "cpu model" will break current ABI, so just create a new array
> > for it would be a better option.
>
>  Well, /proc/cpuinfo is not an ABI, it's meant for human interaction (use
> `sysfs' for machine processing).

In fact there do be some code to use cpuinfo to detect cpu. Gcc is
even in this list.
https://codesearch.debian.net/search?q=cpuinfo&literal=1

>
>  If tools want to use it anyway, then fine, but they need to adapt to the
> relative volatility of the free-form text interface, and also learn all
> the world is not x86 (just like all the MIPS world is not Loongson, so if
> you argue about adding effectively a duplicate field, then that would have
> to be applied across all the platforms).  IOW fix the tool and do not work
> its deficiencies around in the kernel just because it seems easier for you
> to do.
>
>  Here's how example /proc/cpuinfo looks like on RISC-V/Linux BTW:
>
> processor       : 0
> hart            : 1
> isa             : rv64imafdc
> mmu             : sv39
> uarch           : sifive,rocket0

If we create cpuinfo for a new architecture, we are freely do anything.
it is OK, as the newly write code can know about it, and there is no
old codes about it.

While if we have some modification to /proc/cpuinfo, of exists architectures,
we must be very careful to keep compatible.

>
> [...]
>
> -- every Linux platform is different in this respect and tools have to
> live with that.

Yes, you are some right, the scripts/programs should be robust,
while they cannot forecast how the people change cpuinfo, if they are
freely....

>
>   Maciej



-- 
YunQiang Su

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ