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]
Date:   Tue, 19 Jan 2021 14:05:12 -0400
From:   Jason Gunthorpe <jgg@...pe.ca>
To:     Pavel Tatashin <pasha.tatashin@...een.com>
Cc:     linux-kernel@...r.kernel.org, linux-mm@...ck.org,
        akpm@...ux-foundation.org, vbabka@...e.cz, mhocko@...e.com,
        david@...hat.com, osalvador@...e.de, dan.j.williams@...el.com,
        sashal@...nel.org, tyhicks@...ux.microsoft.com,
        iamjoonsoo.kim@....com, mike.kravetz@...cle.com,
        rostedt@...dmis.org, mingo@...hat.com, peterz@...radead.org,
        mgorman@...e.de, willy@...radead.org, rientjes@...gle.com,
        jhubbard@...dia.com, linux-doc@...r.kernel.org,
        ira.weiny@...el.com, linux-kselftest@...r.kernel.org
Subject: Re: [PATCH v5 02/14] mm/gup: check every subpage of a compound page
 during isolation

On Mon, Jan 18, 2021 at 11:39:08PM -0500, Pavel Tatashin wrote:
> When pages are isolated in check_and_migrate_movable_pages() we skip
> compound number of pages at a time. However, as Jason noted, it is
> not necessary correct that pages[i] corresponds to the pages that
> we skipped. This is because it is possible that the addresses in
> this range had split_huge_pmd()/split_huge_pud(), and these functions
> do not update the compound page metadata.
> 
> The problem can be reproduced if something like this occurs:
> 
> 1. User faulted huge pages.
> 2. split_huge_pmd() was called for some reason
> 3. User has unmapped some sub-pages in the range
> 4. User tries to longterm pin the addresses.
> 
> The resulting pages[i] might end-up having pages which are not compound
> size page aligned.
> 
> Fixes: aa712399c1e8 ("mm/gup: speed up check_and_migrate_cma_pages() on huge page")
> 
> Reported-by: Jason Gunthorpe <jgg@...dia.com>

No new line after fixes

> Signed-off-by: Pavel Tatashin <pasha.tatashin@...een.com>
>  mm/gup.c | 19 +++++++------------
>  1 file changed, 7 insertions(+), 12 deletions(-)

Looks good

Reviewed-by: Jason Gunthorpe <jgg@...dia.com>

Thanks,
Jason

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ