Skip to content
Snippets Groups Projects
Commit 166a6682 authored by Vitaly Kuznetsov's avatar Vitaly Kuznetsov
Browse files

Revert "x86/mm: Introduce lookup_address_in_mm()"

Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2074832



commit 643d95aa
Author: Sean Christopherson <seanjc@google.com>
Date:   Fri Apr 29 07:57:53 2022 -0700

    Revert "x86/mm: Introduce lookup_address_in_mm()"

    Drop lookup_address_in_mm() now that KVM is providing it's own variant
    of lookup_address_in_pgd() that is safe for use with user addresses, e.g.
    guards against page tables being torn down.  A variant that provides a
    non-init mm is inherently dangerous and flawed, as the only reason to use
    an mm other than init_mm is to walk a userspace mapping, and
    lookup_address_in_pgd() does not play nice with userspace mappings, e.g.
    doesn't disable IRQs to block TLB shootdowns and doesn't use READ_ONCE()
    to ensure an upper level entry isn't converted to a huge page between
    checking the PAGE_SIZE bit and grabbing the address of the next level
    down.

    This reverts commit 13c72c06.

Signed-off-by: default avatarSean Christopherson <seanjc@google.com>
    Message-Id: <YmwIi3bXr/1yhYV/@google.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>

Signed-off-by: default avatarVitaly Kuznetsov <vkuznets@redhat.com>
parent 893caf3c
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment