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: <ff3a2f25-083c-2363-5e09-4d6acf5291e7@linux.alibaba.com>
Date:   Tue, 19 Jan 2021 19:26:31 +0800
From:   乱石 <zhangliguang@...ux.alibaba.com>
To:     Will Deacon <will@...nel.org>
Cc:     Catalin Marinas <catalin.marinas@....com>,
        Anshuman Khandual <anshuman.khandual@....com>,
        Suzuki K Poulose <suzuki.poulose@....com>,
        Mark Brown <broonie@...nel.org>, gustavoars@...nel.org,
        Vincenzo Frascino <vincenzo.frascino@....com>,
        Dave Martin <Dave.Martin@....com>,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] arm64/cpuinfo: Show right CPU architecture information

在 2021/1/19 19:01, Will Deacon 写道:
> On Tue, Jan 19, 2021 at 06:55:10PM +0800, Liguang Zhang wrote:
>> CPU architecture is assigned to be a fixed value, it should be obtained
>> from midr register.
>>
>> Signed-off-by: Liguang Zhang <zhangliguang@...ux.alibaba.com>
>> ---
>>   arch/arm64/kernel/cpuinfo.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/arch/arm64/kernel/cpuinfo.c b/arch/arm64/kernel/cpuinfo.c
>> index 77605aec25fe..0bd11e0fe9f2 100644
>> --- a/arch/arm64/kernel/cpuinfo.c
>> +++ b/arch/arm64/kernel/cpuinfo.c
>> @@ -191,7 +191,7 @@ static int c_show(struct seq_file *m, void *v)
>>   
>>   		seq_printf(m, "CPU implementer\t: 0x%02x\n",
>>   			   MIDR_IMPLEMENTOR(midr));
>> -		seq_printf(m, "CPU architecture: 8\n");
>> +		seq_printf(m, "CPU architecture: %d\n", MIDR_ARCHITECTURE(midr));
> Huh? Won't this always return 0xf?

Hi Will,

I'm not sure. My platform return 0xf, but /proc/cpuinfo show 8. Why we 
assign a fixed

value to cpu architecture?

Regards

Liguang Zhang

>
> Will

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ