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, 3 May 2022 08:26:42 -0700
From:   Minchan Kim <minchan@...nel.org>
To:     David Hildenbrand <david@...hat.com>
Cc:     Andrew Morton <akpm@...ux-foundation.org>,
        linux-mm <linux-mm@...ck.org>,
        LKML <linux-kernel@...r.kernel.org>,
        John Hubbard <jhubbard@...dia.com>,
        John Dias <joaodias@...gle.com>
Subject: Re: [PATCH] mm: fix is_pinnable_page against on cma page

On Tue, May 03, 2022 at 03:15:24AM +0200, David Hildenbrand wrote:
> 
> >>>> However, I assume we have the same issue right now already with
> >> ZONE_MOVABLE and MIGRATE_CMA when trying to pin a page residing on these
> > 
> > ZONE_MOVALBE is also changed dynamically?
> > 
> 
> Sorry, with "same issue" I meant failing to pin if having to migrate and
> the page is temporarily unmovable.
> 
> >> there are temporarily unmovable and we fail to migrate. But it would now
> >> apply even without ZONE_MOVABLE or MIGRATE_CMA. Hm...
> > 
> > Didn't parse your last mention.
> 
> On a system that neither uses ZONE_MOVABLE nor MIGRATE_CMA we might have
> to migrate now when pinning.

I don't understand your point. My problem is pin_user_pages with
FOLL_LONGTERM. It shouldn't pin a page from ZONE_MOVABLE and cma area
without migrating page out of movable zone or CMA area.
That's why try_grab_folio checks whether target page stays in those
movable areas. However, to check CMA area, is_migrate_cma_page is
racy so the FOLL_LONGTERM flag semantic is broken right now.

Do you see any problem of the fix?

A thing to get some attention is whether we need READ_ONCE or not
for the local variable mt.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ