[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1f934203-5220-01f6-42d1-65cc984a0201@redhat.com>
Date: Thu, 5 Jan 2023 09:47:10 +0100
From: David Hildenbrand <david@...hat.com>
To: Peter Xu <peterx@...hat.com>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Cc: Mike Kravetz <mike.kravetz@...cle.com>,
Muchun Song <songmuchun@...edance.com>,
Nadav Amit <nadav.amit@...il.com>,
Andrea Arcangeli <aarcange@...hat.com>,
James Houghton <jthoughton@...gle.com>,
Axel Rasmussen <axelrasmussen@...gle.com>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH 3/3] mm/uffd: Detect pgtable allocation failures
On 04.01.23 23:52, Peter Xu wrote:
> Before this patch, when there's any pgtable allocation issues happened
> during change_protection(), the error will be ignored from the syscall.
> For shmem, there will be an error dumped into the host dmesg. Two issues
> with that:
>
> (1) Doing a trace dump when allocation fails is not anything close to
> grace..
s/..//
>
> (2) The user should be notified with any kind of such error, so the user
> can trap it and decide what to do next, either by retrying, or stop
> the process properly, or anything else.
>
> For userfault users, this will change the API of UFFDIO_WRITEPROTECT when
> pgtable allocation failure happened. It should not normally break anyone,
> though. If it breaks, then in good ways.
>
> One man-page update will be on the way to introduce the new -ENOMEM for
> UFFDIO_WRITEPROTECT. Not marking stable so we keep the old behavior on the
> 5.19-till-now kernels.
We'd now fail after already having modified some state (protected some
PTEs). I assume that can already happen when protecting across multiple
VMAs and is expected, right?
--
Thanks,
David / dhildenb
Powered by blists - more mailing lists