[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YmiZcZf9YXxMVcfx@google.com>
Date: Wed, 27 Apr 2022 01:16:33 +0000
From: Sean Christopherson <seanjc@...gle.com>
To: Mingwei Zhang <mizhang@...gle.com>
Cc: Paolo Bonzini <pbonzini@...hat.com>,
Vitaly Kuznetsov <vkuznets@...hat.com>,
Wanpeng Li <wanpengli@...cent.com>,
Jim Mattson <jmattson@...gle.com>,
Joerg Roedel <joro@...tes.org>, kvm <kvm@...r.kernel.org>,
LKML <linux-kernel@...r.kernel.org>,
Ben Gardon <bgardon@...gle.com>,
David Matlack <dmatlack@...gle.com>
Subject: Re: [PATCH] KVM: x86/mmu: add lockdep check before
lookup_address_in_mm()
On Tue, Apr 26, 2022, Mingwei Zhang wrote:
> > I completely agree that lookup_address() and friends are unnecessarily fragile,
> > but I think that attempting to harden them to fix this KVM bug will open a can
> > of worms and end up delaying getting KVM fixed.
>
> So basically, we need to:
> - choose perf_get_page_size() instead of using any of the
> lookup_address*() in mm.
> - add a wrapper layer to adapt: 1) irq disabling/enabling and 2) size
> -> level translation.
>
> Agree?
Drat, I didn't see that it returns the page size, not the level. That's a bit
unfortunate. It definitely makes me less averse to fixing lookup_address_in_pgd()
Hrm. I guess since we know there's at least one broken user, and in theory
fixing lookup_address_in_pgd() should do no harm to users that don't need protection,
it makes sense to just fix lookup_address_in_pgd() and see if the x86 maintainers
push back.
Powered by blists - more mailing lists