All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next v7 0/6]mm: page_table_check: add support on arm64 and riscv
@ 2022-05-07 11:01 ` Tong Tiangen
  0 siblings, 0 replies; 48+ messages in thread
From: Tong Tiangen @ 2022-05-07 11:01 UTC (permalink / raw)
  To: Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, x86,
	H. Peter Anvin, Pasha Tatashin, Anshuman Khandual, Andrew Morton,
	Catalin Marinas, Will Deacon, Paul Walmsley, Palmer Dabbelt,
	Albert Ou
  Cc: linux-kernel, linux-mm, linux-arm-kernel, linux-riscv,
	Tong Tiangen, Kefeng Wang, Guohanjun

Page table check performs extra verifications at the time when new
pages become accessible from the userspace by getting their page
table entries (PTEs PMDs etc.) added into the table. It is supported
on X86[1].

This patchset made some simple changes and make it easier to support
new architecture, then we support this feature on ARM64 and RISCV.

[1]https://lore.kernel.org/lkml/20211123214814.3756047-1-pasha.tatashin@soleen.com/

v6 -> v7:
 According to Anshuman and Catalin's suggestion, optimized code
 implementation:
 1. __set_pte_at() code specification modification.
 2. pmdp_huge_get_and_clear() implementation optimization.

v5 -> v6:
 According to Anshuman's suggestion, optimized partial implementation and
 commit message:
 1. Remove redundant IS_ENABLED() in ptep_clear().
 2. Remove redundant __HAVE_ARCH_PTEP_CLEAR usage in pgtable.h.
 3. Remove redundant __ptep_get_and_clear() on arm64 and riscv.

v4 -> v5:
 According to Anshuman's suggestion, using PxD_SIZE instead of
 PxD_PAGE_SIZE in mm/page_table_check.c and it is checked by Pasha.

v3 -> v4:
 Adapt to next-20220414

v2 -> v3:
 Modify ptep_clear() in include/linux/pgtable.h, using IS_ENABLED according
 to the suggestions of Pasha.

v1 -> v2:
 1. Fix arm64's pte/pmd/pud_user_accessible_page() according to the
    suggestions of Catalin.
 2. Also fix riscv's pte_pmd_pud_user_accessible_page().

Kefeng Wang (2):
  mm: page_table_check: move pxx_user_accessible_page into x86
  arm64/mm: Enable ARCH_SUPPORTS_PAGE_TABLE_CHECK

Tong Tiangen (4):
  mm: page_table_check: using PxD_SIZE instead of PxD_PAGE_SIZE
  mm: page_table_check: add hooks to public helpers
  mm: remove __HAVE_ARCH_PTEP_CLEAR in pgtable.h
  riscv/mm: Enable ARCH_SUPPORTS_PAGE_TABLE_CHECK

 arch/arm64/Kconfig               |  1 +
 arch/arm64/include/asm/pgtable.h | 61 ++++++++++++++++++++++++---
 arch/riscv/Kconfig               |  1 +
 arch/riscv/include/asm/pgtable.h | 71 +++++++++++++++++++++++++++++---
 arch/x86/include/asm/pgtable.h   | 27 +++++++-----
 include/linux/pgtable.h          | 21 ++++++----
 mm/page_table_check.c            | 25 ++---------
 7 files changed, 156 insertions(+), 51 deletions(-)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 48+ messages in thread

end of thread, other threads:[~2022-05-31 16:06 UTC | newest]

Thread overview: 48+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-07 11:01 [PATCH -next v7 0/6]mm: page_table_check: add support on arm64 and riscv Tong Tiangen
2022-05-07 11:01 ` Tong Tiangen
2022-05-07 11:01 ` Tong Tiangen
2022-05-07 11:01 ` [PATCH -next v7 1/6] mm: page_table_check: using PxD_SIZE instead of PxD_PAGE_SIZE Tong Tiangen
2022-05-07 11:01   ` Tong Tiangen
2022-05-07 11:01   ` Tong Tiangen
2022-05-07 11:01 ` [PATCH -next v7 2/6] mm: page_table_check: move pxx_user_accessible_page into x86 Tong Tiangen
2022-05-07 11:01   ` Tong Tiangen
2022-05-07 11:01   ` Tong Tiangen
2022-05-07 11:01 ` [PATCH -next v7 3/6] mm: page_table_check: add hooks to public helpers Tong Tiangen
2022-05-07 11:01   ` Tong Tiangen
2022-05-07 11:01   ` Tong Tiangen
2022-05-07 11:01 ` [PATCH -next v7 4/6] mm: remove __HAVE_ARCH_PTEP_CLEAR in pgtable.h Tong Tiangen
2022-05-07 11:01   ` Tong Tiangen
2022-05-07 11:01   ` Tong Tiangen
2022-05-07 11:01 ` [PATCH -next v7 5/6] arm64/mm: Enable ARCH_SUPPORTS_PAGE_TABLE_CHECK Tong Tiangen
2022-05-07 11:01   ` Tong Tiangen
2022-05-07 11:01   ` Tong Tiangen
2022-05-07 18:17   ` Catalin Marinas
2022-05-07 18:17     ` Catalin Marinas
2022-05-07 18:17     ` Catalin Marinas
2022-05-09  9:09   ` Anshuman Khandual
2022-05-09  9:09     ` Anshuman Khandual
2022-05-09  9:09     ` Anshuman Khandual
2022-05-17 13:54   ` Anders Roxell
2022-05-17 13:54     ` Anders Roxell
2022-05-17 13:54     ` Anders Roxell
2022-05-17 14:02     ` Pasha Tatashin
2022-05-17 14:02       ` Pasha Tatashin
2022-05-17 14:02       ` Pasha Tatashin
2022-05-17 14:33       ` Anders Roxell
2022-05-17 14:33         ` Anders Roxell
2022-05-17 14:33         ` Anders Roxell
2022-05-28 16:41         ` Anders Roxell
2022-05-28 16:41           ` Anders Roxell
2022-05-28 16:41           ` Anders Roxell
2022-05-31 16:05           ` Will Deacon
2022-05-31 16:05             ` Will Deacon
2022-05-31 16:05             ` Will Deacon
2022-05-07 11:01 ` [PATCH -next v7 6/6] riscv/mm: " Tong Tiangen
2022-05-07 11:01   ` Tong Tiangen
2022-05-07 11:01   ` Tong Tiangen
2022-05-24  4:17   ` Palmer Dabbelt
2022-05-24  4:17     ` Palmer Dabbelt
2022-05-24  4:17     ` Palmer Dabbelt
2022-05-24  6:40     ` Tong Tiangen
2022-05-24  6:40       ` Tong Tiangen
2022-05-24  6:40       ` Tong Tiangen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.