• P
    mm: introduce FAULT_FLAG_INTERRUPTIBLE · c270a7ee
    Peter Xu 提交于
    handle_userfaultfd() is currently the only one place in the kernel page
    fault procedures that can respond to non-fatal userspace signals.  It was
    trying to detect such an allowance by checking against USER & KILLABLE
    flags, which was "un-official".
    
    In this patch, we introduced a new flag (FAULT_FLAG_INTERRUPTIBLE) to show
    that the fault handler allows the fault procedure to respond even to
    non-fatal signals.  Meanwhile, add this new flag to the default fault
    flags so that all the page fault handlers can benefit from the new flag.
    With that, replacing the userfault check to this one.
    
    Since the line is getting even longer, clean up the fault flags a bit too
    to ease TTY users.
    
    Although we've got a new flag and applied it, we shouldn't have any
    functional change with this patch so far.
    Suggested-by: NLinus Torvalds <torvalds@linux-foundation.org>
    Signed-off-by: NPeter Xu <peterx@redhat.com>
    Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
    Tested-by: NBrian Geffon <bgeffon@google.com>
    Reviewed-by: NDavid Hildenbrand <david@redhat.com>
    Cc: Andrea Arcangeli <aarcange@redhat.com>
    Cc: Bobby Powers <bobbypowers@gmail.com>
    Cc: Denis Plotnikov <dplotnikov@virtuozzo.com>
    Cc: "Dr . David Alan Gilbert" <dgilbert@redhat.com>
    Cc: Hugh Dickins <hughd@google.com>
    Cc: Jerome Glisse <jglisse@redhat.com>
    Cc: Johannes Weiner <hannes@cmpxchg.org>
    Cc: "Kirill A . Shutemov" <kirill@shutemov.name>
    Cc: Martin Cracauer <cracauer@cons.org>
    Cc: Marty McFadden <mcfadden8@llnl.gov>
    Cc: Matthew Wilcox <willy@infradead.org>
    Cc: Maya Gokhale <gokhale2@llnl.gov>
    Cc: Mel Gorman <mgorman@suse.de>
    Cc: Mike Kravetz <mike.kravetz@oracle.com>
    Cc: Mike Rapoport <rppt@linux.vnet.ibm.com>
    Cc: Pavel Emelyanov <xemul@openvz.org>
    Link: http://lkml.kernel.org/r/20200220195348.16302-1-peterx@redhat.comSigned-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
    c270a7ee
mm.h 95.8 KB