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: <cb057c6a-0eb4-581e-c259-7a31545e0ae7@arm.com>
Date:   Thu, 28 Jun 2018 10:38:24 +0100
From:   Sudeep Holla <sudeep.holla@....com>
To:     Shunyong Yang <shunyong.yang@...-semitech.com>,
        catalin.marinas@....com
Cc:     Sudeep Holla <sudeep.holla@....com>, will.deacon@....com,
        linux-kernel@...r.kernel.org, jeremy.linton@....com,
        Joey Zheng <yu.zheng@...-semitech.com>,
        Andrew Jones <drjones@...hat.com>
Subject: Re: [RFC PATCH] arm64: topology: Map PPTT node offset to logic
 physical package id

Hi Shunyong,

On 28/06/18 10:18, Shunyong Yang wrote:
> As PPTT spec doesn't define the physical package id,
> find_acpi_cpu_topology_package() will return offset of the node with
> Physical package field set when querying physical package id. So, it
> returns 162(0xA2) in following example.
> 
> [0A2h 0162   1]                Subtable Type : 00 [Processor Hierarchy
> Node]
> [0A3h 0163   1]                       Length : 1C
> [0A4h 0164   2]                     Reserved : 0000
> [0A6h 0166   4]        Flags (decoded below) : 00000003
>                             Physical package : 1
>                      ACPI Processor ID valid : 1
> [0AAh 0170   4]                       Parent : 00000000
> [0AEh 0174   4]            ACPI Processor ID : 00001000
> [0B2h 0178   4]      Private Resource Number : 00000002
> [0B6h 0182   4]             Private Resource : 0000006C
> [0BAh 0186   4]             Private Resource : 00000084
> 
> So, when "cat physical_package" in /sys/devices/system/cpu/cpu0/topology/,
> it will output 162(0xA2). And if some items are added before the node
> above, the output will change to other value.
> 
> This patch maps the node offset to a logic package id. It maps the first
> node offset to 0, the second to 1, and so on.
> 
> Then, it will not output a big value, such as 162 above. And it will
> not change when some nodes(Physical package not set) are added.
> 
> And as long as the nodes with Physical package field set in PPTT keeps
> the real hardware order, the logic id can map to hardware package id to
> some extent.
> 
> Hope to get feedback from you.

Thanks for the patch, but Andrew Jones has also posted a patch[1] which
I had a look but was not sure what is the best approach to fix it yet.
I will think about it and respond to that.

--
Regards,
Sudeep

[1] https://patchwork.kernel.org/patch/10482261

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ