lkml.org 
[lkml]   [2021]   [Feb]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/2] mm: provide a sane PTE walking API for modules
On Fri, Feb 05, 2021 at 05:32:58AM -0500, Paolo Bonzini wrote:
> Currently, the follow_pfn function is exported for modules but
> follow_pte is not. However, follow_pfn is very easy to misuse,
> because it does not provide protections (so most of its callers
> assume the page is writable!) and because it returns after having
> already unlocked the page table lock.
>
> Provide instead a simplified version of follow_pte that does
> not have the pmdpp and range arguments. The older version
> survives as follow_invalidate_pte() for use by fs/dax.c.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> arch/s390/pci/pci_mmio.c | 2 +-
> fs/dax.c | 5 +++--
> include/linux/mm.h | 6 ++++--
> mm/memory.c | 35 ++++++++++++++++++++++++++++++-----
> 4 files changed, 38 insertions(+), 10 deletions(-)

Looks good to me, thanks

Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>

Jason

\
 
 \ /
  Last update: 2021-02-05 14:54    [W:0.180 / U:0.208 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site