lkml.org 
[lkml]   [2014]   [Jan]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] mm/mmu_notifier: restore set_pte_at_notify semantics
On Wed, Jan 15, 2014 at 11:40:34AM +0200, Mike Rapoport wrote:
> Commit 6bdb913f0a70a4dfb7f066fb15e2d6f960701d00 (mm: wrap calls to
> set_pte_at_notify with invalidate_range_start and invalidate_range_end)
> breaks semantics of set_pte_at_notify. When calls to set_pte_at_notify
> are wrapped with mmu_notifier_invalidate_range_start and
> mmu_notifier_invalidate_range_end, KVM zaps pte during
> mmu_notifier_invalidate_range_start callback and set_pte_at_notify has
> no spte to update and therefore it's called for nothing.
>
> As Andrea suggested (1), the problem is resolved by calling
> mmu_notifier_invalidate_page after PT lock has been released and only
> for mmu_notifiers that do not implement change_ptr callback.
>
> (1) http://thread.gmane.org/gmane.linux.kernel.mm/111710/focus=111711
>
> Reported-by: Izik Eidus <izik.eidus@ravellosystems.com>
> Signed-off-by: Mike Rapoport <mike.rapoport@ravellosystems.com>
> Cc: Andrea Arcangeli <aarcange@redhat.com>
> Cc: Haggai Eran <haggaie@mellanox.com>
> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
> ---
> include/linux/mmu_notifier.h | 31 ++++++++++++++++++++++++++-----
> kernel/events/uprobes.c | 12 ++++++------
> mm/ksm.c | 15 +++++----------
> mm/memory.c | 14 +++++---------
> mm/mmu_notifier.c | 24 ++++++++++++++++++++++--
> 5 files changed, 64 insertions(+), 32 deletions(-)

Reviewed-by: Andrea Arcangeli <aarcange@redhat.com>

Thanks!
Andrea


\
 
 \ /
  Last update: 2014-01-22 15:01    [W:0.069 / U:1.348 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site