From: "David Hildenbrand (Arm)" <david@kernel.org>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org,
Alex Williamson <alex@shazbot.org>, Fei Li <fei1.li@intel.com>,
Peter Xu <peterx@redhat.com>,
linux-s390@vger.kernel.org, linux-mm@kvack.org,
Sergio Lopez <slp@redhat.com>
Subject: Re: [PATCH] mm: pull writability check to follow_pfnmap_start()
Date: Tue, 4 Aug 2026 11:22:40 +0200 [thread overview]
Message-ID: <053ffb1c-d4e7-4558-8784-8e1eb72de9db@kernel.org> (raw)
In-Reply-To: <CABgObfb_FN9r+D2F=GNsADP5xt0syFztmy-x==T85ovZKyopRA@mail.gmail.com>
On 8/4/26 10:24, Paolo Bonzini wrote:
> On Mon, Aug 3, 2026 at 10:55 AM David Hildenbrand (Arm)
> <david@kernel.org> wrote:
>>> index 485df9c2dbdd..34c79b5fcb9b 100644
>>> --- a/include/linux/mm.h
>>> +++ b/include/linux/mm.h
>>> @@ -3136,9 +3136,12 @@ struct follow_pfnmap_args {
>>> * Inputs:
>>> * @vma: Pointer to @vm_area_struct struct
>>> * @address: the virtual address to walk
>>> + * @write_fault: if true, fail with -EFAULT unless the mapping is
>>
>> Just wondering whether EPERM would be better.
>
> I considered EACCES, but EFAULT seems more appropriate: it's already
> what most callers return, and vm_fault_to_errno() never returns
> EACCES.
EACCES is what I actually wanted to say :)
EFAULT works for me, right now it's a clear indication for insufficient permissions.
--
Cheers,
David
prev parent reply other threads:[~2026-08-04 9:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-31 16:05 [PATCH] mm: pull writability check to follow_pfnmap_start() Paolo Bonzini
2026-08-03 8:55 ` David Hildenbrand (Arm)
2026-08-04 8:24 ` Paolo Bonzini
2026-08-04 9:22 ` David Hildenbrand (Arm) [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=053ffb1c-d4e7-4558-8784-8e1eb72de9db@kernel.org \
--to=david@kernel.org \
--cc=alex@shazbot.org \
--cc=fei1.li@intel.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-s390@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=peterx@redhat.com \
--cc=slp@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox