lkml.org 
[lkml]   [2021]   [Nov]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Date
    SubjectRe: [PATCH 5.4 063/355] powerpc/kvm: Fix kvm_use_magic_page
    Greg,

    On Mon, Nov 15, 2021 at 6:10 PM Greg Kroah-Hartman
    <gregkh@linuxfoundation.org> wrote:
    > From: Andreas Gruenbacher <agruenba@redhat.com>
    >
    > commit 0c8eb2884a42d992c7726539328b7d3568f22143 upstream.
    >
    > When switching from __get_user to fault_in_pages_readable, commit
    > 9f9eae5ce717 broke kvm_use_magic_page: like __get_user,
    > fault_in_pages_readable returns 0 on success.

    I've not heard back from the maintainers about this patch so far, so
    it would probably be safer to leave it out of stable for now.

    Thanks,
    Andreas

    > Fixes: 9f9eae5ce717 ("powerpc/kvm: Prefer fault_in_pages_readable function")
    > Cc: stable@vger.kernel.org # v4.18+
    > Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
    > Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    > ---
    > arch/powerpc/kernel/kvm.c | 2 +-
    > 1 file changed, 1 insertion(+), 1 deletion(-)
    >
    > --- a/arch/powerpc/kernel/kvm.c
    > +++ b/arch/powerpc/kernel/kvm.c
    > @@ -669,7 +669,7 @@ static void __init kvm_use_magic_page(vo
    > on_each_cpu(kvm_map_magic_page, &features, 1);
    >
    > /* Quick self-test to see if the mapping works */
    > - if (!fault_in_pages_readable((const char *)KVM_MAGIC_PAGE, sizeof(u32))) {
    > + if (fault_in_pages_readable((const char *)KVM_MAGIC_PAGE, sizeof(u32))) {
    > kvm_patching_worked = false;
    > return;
    > }
    >
    >

    \
     
     \ /
      Last update: 2021-11-15 20:40    [W:4.087 / U:0.032 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site