Re: [RFC PATCH 4/4] x86/mm: write protect (most) page tables

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

 



On Mon, 2021-08-23 at 16:25 +0300, Mike Rapoport wrote:
> From: Mike Rapoport <rppt@xxxxxxxxxxxxx>
> 
> Allocate page table using __GFP_PTE_MAPPED so that they will have 4K
> PTEs
> in the direct map. This allows to switch _PAGE_RW bit each time a
> page
> table page needs to be made writable or read-only.
> 
> The writability of the page tables is toggled only in the lowest
> level page
> table modifiction functions and immediately switched off.
> 
> The page tables created early in the boot (including the direct map
> page
> table) are not write protected.
> 
> Co-developed-by: Rick Edgecombe <rick.p.edgecombe@xxxxxxxxx>
> Signed-off-by: Rick Edgecombe <rick.p.edgecombe@xxxxxxxxx>
> Signed-off-by: Mike Rapoport <rppt@xxxxxxxxxxxxx>
> ---
I have a second version of the PKS tables series that I think gets all
of them.

Also, I didn't see any flush anywhere when toggling. I guess the
spurious kernel fault handler is doing the work? It might be better to
just do a local flush of the address.





[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