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: <CAJZ5v0jYb7XQC7u0rmxF-XVMAsEoOfmD11-FYDvMrZuOuzgyiA@mail.gmail.com>
Date:   Tue, 10 Dec 2019 09:06:27 +0100
From:   "Rafael J. Wysocki" <rafael@...nel.org>
To:     Tao Xu <tao3.xu@...el.com>
Cc:     "Rafael J. Wysocki" <rafael@...nel.org>,
        Rafael Wysocki <rafael.j.wysocki@...el.com>,
        Len Brown <lenb@...nel.org>,
        Keith Busch <keith.busch@...el.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Dan Williams <dan.j.williams@...el.com>,
        Dave Hansen <dave.hansen@...ux.intel.com>,
        ACPI Devel Maling List <linux-acpi@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] ACPI/HMAT: Fix the parsing of Cache Associativity and
 Write Policy

On Tue, Dec 10, 2019 at 2:04 AM Tao Xu <tao3.xu@...el.com> wrote:
>
> On 12/9/2019 6:01 PM, Rafael J. Wysocki wrote:
> > On Mon, Dec 2, 2019 at 8:03 AM Tao Xu <tao3.xu@...el.com> wrote:
> >>
> >> In chapter 5.2.27.5, Table 5-147: Field "Cache Attributes" of
> >> ACPI 6.3 spec: 0 is "None", 1 is "Direct Mapped", 2 is "Complex Cache
> >> Indexing" for Cache Associativity; 0 is "None", 1 is "Write Back",
> >> 2 is "Write Through" for Write Policy.
> >
> > Well, I'm not sure what the connection between the above statement,
> > which is correct AFAICS, and the changes made by the patch is.
> >
> > Is that the *_OTHER symbol names are confusing or something deeper?
> >
>
> Because in include/acpi/actbl1.h:
>
> #define ACPI_HMAT_CA_NONE                     (0)
>
> ACPI_HMAT_CA_NONE is 0, but in include/linux/node.h:
>
>     enum cache_indexing {
>            NODE_CACHE_DIRECT_MAP,
>            NODE_CACHE_INDEXED,
>            NODE_CACHE_OTHER,
>     };
> NODE_CACHE_OTHER is 2, and for otner enum:
>
>           case ACPI_HMAT_CA_DIRECT_MAPPED:
>                   tcache->cache_attrs.indexing = NODE_CACHE_DIRECT_MAP;
>                   break;
>           case ACPI_HMAT_CA_COMPLEX_CACHE_INDEXING:
>                   tcache->cache_attrs.indexing = NODE_CACHE_INDEXED;
>                   break;
> in include/acpi/actbl1.h:
>
>   #define ACPI_HMAT_CA_DIRECT_MAPPED            (1)
>   #define ACPI_HMAT_CA_COMPLEX_CACHE_INDEXING   (2)
>
> but in include/linux/node.h:
>
> NODE_CACHE_DIRECT_MAP is 0, NODE_CACHE_INDEXED is 1. This is incorrect.

Why is it incorrect?

> And same for enum cache_write_policy.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ