Re: [RESEND PATCH v5 2/3] mm/mprotect: do not flush when not required architecturally

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

 




> On Mar 19, 2022, at 5:07 PM, Nadav Amit <nadav.amit@xxxxxxxxx> wrote:
> 
> From: Nadav Amit <namit@xxxxxxxxxx>
> 
> Currently, using mprotect() to unprotect a memory region or uffd to
> unprotect a memory region causes a TLB flush. However, in such cases the
> PTE is often not modified (i.e., remain RO) and therefore not TLB flush
> is needed.
> 
> Add an arch-specific pte_needs_flush() which tells whether a TLB flush
> is needed based on the old PTE and the new one. Implement an x86
> pte_needs_flush().
> 
> Always flush the TLB when it is architecturally needed even when
> skipping a TLB flush might only result in a spurious page-faults by
> skipping the flush.


Errr.. Sent the wrong version. Will resend with new version number.




[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