• Pasha Tatashin's avatar
    mm: ptep_clear() page table helper · 08d5b29e
    Pasha Tatashin authored
    We have ptep_get_and_clear() and ptep_get_and_clear_full() helpers to
    clear PTE from user page tables, but there is no variant for simple
    clear of a present PTE from user page tables without using a low level
    pte_clear() which can be either native or para-virtualised.
    
    Add a new ptep_clear() that can be used in common code to clear PTEs
    from page table.  We will need this call later in order to add a hook
    for page table check.
    
    Link: https://lkml.kernel.org/r/20211221154650.1047963-3-pasha.tatashin@soleen.comSigned-off-by: default avatarPasha Tatashin <pasha.tatashin@soleen.com>
    Cc: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
    Cc: Dave Hansen <dave.hansen@linux.intel.com>
    Cc: David Rientjes <rientjes@google.com>
    Cc: Frederic Weisbecker <frederic@kernel.org>
    Cc: Greg Thelen <gthelen@google.com>
    Cc: "H. Peter Anvin" <hpa@zytor.com>
    Cc: Hugh Dickins <hughd@google.com>
    Cc: Ingo Molnar <mingo@redhat.com>
    Cc: Jiri Slaby <jirislaby@kernel.org>
    Cc: Jonathan Corbet <corbet@lwn.net>
    Cc: Kees Cook <keescook@chromium.org>
    Cc: Masahiro Yamada <masahiroy@kernel.org>
    Cc: Mike Rapoport <rppt@kernel.org>
    Cc: Muchun Song <songmuchun@bytedance.com>
    Cc: Paul Turner <pjt@google.com>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Sami Tolvanen <samitolvanen@google.com>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Cc: Wei Xu <weixugc@google.com>
    Cc: Will Deacon <will@kernel.org>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    08d5b29e
khugepaged.c 59.4 KB