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] [day] [month] [year] [list]
Message-ID: <830b10df-f697-409d-9ec4-37bc0196cec7@redhat.com>
Date: Wed, 4 Jun 2025 15:18:36 +0200
From: David Hildenbrand <david@...hat.com>
To: Jason Gunthorpe <jgg@...pe.ca>
Cc: Hyesoo Yu <hyesoo.yu@...sung.com>, janghyuck.kim@...sung.com,
 zhaoyang.huang@...soc.com, jaewon31.kim@...il.com,
 Andrew Morton <akpm@...ux-foundation.org>, John Hubbard
 <jhubbard@...dia.com>, Peter Xu <peterx@...hat.com>, linux-mm@...ck.org,
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm: gup: fail migration when no migratable page to
 prevent CMA pinning

On 04.06.25 15:11, Jason Gunthorpe wrote:
> On Wed, Jun 04, 2025 at 12:07:21PM +0200, David Hildenbrand wrote:
> 
>>> Instead of retrying, this patch explicitly fails the migration attempt
>>> (-EBUSY) if no movable pages are found and unpinnable pages remain.
>>> This avoids infinite loops and gives user a clear signal to retry,
>>> rather then spinning inside kernel.
>>
>> Hmmm, that means we will return EBUSY to the caller. Are all users actually
>> prepared to deal with that?
> 
> I don't think anyone is really prepared to deal with GUP temporarily
> failing..
> 
> Kernel is expected to sort it out. We tolerated the existing temporary
> failure due to its rarity and lack of a solution only.
> 
> Either it can be gup'd or not. There should be no retry.

Right, so -EAGAIN should be used for now such that GUP itself will retry 
and can be canceled on signal if required.

-- 
Cheers,

David / dhildenb


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ