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: <20220217003414.jmrdpv5ytoklz6yb@master>
Date:   Thu, 17 Feb 2022 00:34:14 +0000
From:   Wei Yang <richard.weiyang@...il.com>
To:     Matthew Wilcox <willy@...radead.org>
Cc:     Andrew Morton <akpm@...ux-foundation.org>,
        Wei Yang <richard.weiyang@...il.com>, peterz@...radead.org,
        vbabka@...e.cz, will@...nel.org, linyunsheng@...wei.com,
        aarcange@...hat.com, feng.tang@...el.com, ebiederm@...ssion.com,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm: remove offset check on page->compound_head and
 folio->lru

On Sat, Jan 08, 2022 at 12:49:53AM +0000, Matthew Wilcox wrote:
>On Fri, Jan 07, 2022 at 04:08:25PM -0800, Andrew Morton wrote:
>> On Fri, 7 Jan 2022 22:11:20 +0000 Matthew Wilcox <willy@...radead.org> wrote:
>> 
[...]
>> > > Hi, Matthew
>> > > 
>> > > Would you mind sharing some insight on this check?
>> > 
>> > It's right there in the comments.
>> 
>> Well I can't figure out which comment you're referring to?
>
>         * WARNING: bit 0 of the first word is used for PageTail(). That
>         * means the other users of this union MUST NOT use the bit to
>         * avoid collision and false-positive PageTail().
>
>> > If you can't be bothered to read, why should I write?
>> 

Hi, Matthew

This change is introduced in commit 1d798ca3f164 'mm: make compound_head()
robust'.

As mentioned in the changelog.

```
    That means page->compound_head shares storage space with:

    - page->lru.next;
    - page->next;
    - page->rcu_head.next;
```

We need to make sure those fields in page don't use bit 0 of the word.

So this is an internal guarantee in struct page. I don't see the reason to
compare page->compound_head and folio->lru here.

Maybe I miss something. If you would explain a little, I would appreciate
much.

-- 
Wei Yang
Help you, Help me

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ