lkml.org 
[lkml]   [2023]   [Feb]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 0/3] mm/arch: Fix a few collide definition on private use of VM_FAULT_*
On Mon, Feb 06, 2023 at 02:51:18AM +0000, Matthew Wilcox wrote:
> That wasn't what I meant. I meant putting VM_FAULT_BADMAP and
> VM_FAULT_SIGSEGV in mm_types.h. Not having "Here is a range of reserved
> arch private ones".

VM_FAULT_SIGSEGV is there already; I assume you meant adding them all
directly into vm_fault_reason.

Then I don't think it's a good idea..

Currently vm_fault_reason is a clear interface for handle_mm_fault() for
not only arch pffault handlers but also soft faults like GUP.

If handle_mm_fault() doesn't return VM_FAULT_BADMAP at all, I don't think
we should have it as public API at all. When arch1 people reading the
VM_FAULT_ documents, it shouldn't care about some fault reason that only
happens with arch2. Gup shouldn't care about it either.

Logically a new page fault handler should handle all the retval of
vm_fault_reason afaiu. That shouldn't include e.g. VM_FAULT_BADMAP either.

Thanks,

--
Peter Xu

\
 
 \ /
  Last update: 2023-03-27 00:10    [W:0.765 / U:0.352 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site