lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 20 Nov 2020 16:44:59 +0100
From:   Daniel Vetter <>
To:     Paolo Bonzini <>
Cc:     DRI Development <>,
        LKML <>,
        KVM list <>, Linux MM <>,
        Linux ARM <>,
        linux-samsung-soc <>,
        Daniel Vetter <>,
        Christoph Hellwig <>,
        Jason Gunthorpe <>,
        Kees Cook <>,
        Dan Williams <>,
        Andrew Morton <>,
        John Hubbard <>,
        Jérôme Glisse <>,
        Jan Kara <>
Subject: Re: [PATCH v6 16/17] RFC: kvm: pass kvm argument to follow_pfn callsites

On Fri, Nov 20, 2020 at 4:33 PM Paolo Bonzini <> wrote:
> On 19/11/20 15:41, Daniel Vetter wrote:
> > Both Christoph Hellwig and Jason Gunthorpe suggested that usage of
> > follow_pfn by modules should be locked down more. To do so callers
> > need to be able to pass the mmu_notifier subscription corresponding
> > to the mm_struct to follow_pfn().
> >
> > This patch does the rote work of doing that in the kvm subsystem. In
> > most places this is solved by passing struct kvm * down the call
> > stacks as an additional parameter, since that contains the
> > mmu_notifier.
> >
> > Compile tested on all affected arch.
> It's a bit of a pity, it's making an API more complex (the point of
> gfn_to_pfn_memslot vs gfn_to_pfn is exactly that you don't need a
> "struct kvm*" and it's clear that you've already done the lookup into
> that struct kvm.

Yeah I noticed that, I think pushing the lookups down should work, but
that's a fairly large-scale change. I didn't want to do that for the
RFC since it would distract from the actual change/goal.

> But it's not a big deal, and the rationale at least makes sense.  So,
> Acked-by: Paolo Bonzini <>
> Paolo

Daniel Vetter
Software Engineer, Intel Corporation

Powered by blists - more mailing lists