Re: [PATCH 1/3] virt: acrn: stop using follow_pfn

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 26.03.24 07:04, Christoph Hellwig wrote:
On Mon, Mar 25, 2024 at 11:33:31AM +0100, David Hildenbrand wrote:
... I have similar patches lying around here (see bwlow). I added some
actual access permission checks.

(I also realized, that if we get an anon folio in a COW mapping via follow_pte()
here, I suspect one might be able to do some nasty things. Just imagine if we
munmap(), free the anon folio, and then it gets used in other context ... At
least KVM/vfio handle that using references+MMU notifiers.)

How about you just send out your series that seems to go further and
I retract mine?

Let's go with yours first and I'll rebase.

Regarding above issue, I still have not made up my mind: likely we should reject any PFN in acrn that has a valid "struct page", and that page does not have PG_reserved set. That's what VFIO effectively does IIRC.

--
Cheers,

David / dhildenb





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux