All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tong Tiangen <tongtiangen@huawei.com>
To: Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	Dave Hansen <dave.hansen@linux.intel.com>, <x86@kernel.org>,
	"H. Peter Anvin" <hpa@zytor.com>,
	Pasha Tatashin <pasha.tatashin@soleen.com>,
	Anshuman Khandual <anshuman.khandual@arm.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will@kernel.org>,
	Paul Walmsley <paul.walmsley@sifive.com>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	Albert Ou <aou@eecs.berkeley.edu>
Cc: <linux-kernel@vger.kernel.org>, <linux-mm@kvack.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-riscv@lists.infradead.org>,
	Tong Tiangen <tongtiangen@huawei.com>,
	Kefeng Wang <wangkefeng.wang@huawei.com>,
	Guohanjun <guohanjun@huawei.com>
Subject: [PATCH -next v6 0/6]mm: page_table_check: add support on arm64 and riscv
Date: Tue, 26 Apr 2022 08:10:30 +0000	[thread overview]
Message-ID: <20220426081036.1374452-1-tongtiangen@huawei.com> (raw)

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/

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 | 59 +++++++++++++++++++++++---
 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, 155 insertions(+), 50 deletions(-)

-- 
2.25.1


WARNING: multiple messages have this Message-ID (diff)
From: Tong Tiangen <tongtiangen@huawei.com>
To: Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	Dave Hansen <dave.hansen@linux.intel.com>, <x86@kernel.org>,
	"H. Peter Anvin" <hpa@zytor.com>,
	Pasha Tatashin <pasha.tatashin@soleen.com>,
	Anshuman Khandual <anshuman.khandual@arm.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will@kernel.org>,
	Paul Walmsley <paul.walmsley@sifive.com>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	Albert Ou <aou@eecs.berkeley.edu>
Cc: <linux-kernel@vger.kernel.org>, <linux-mm@kvack.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-riscv@lists.infradead.org>,
	Tong Tiangen <tongtiangen@huawei.com>,
	Kefeng Wang <wangkefeng.wang@huawei.com>,
	Guohanjun <guohanjun@huawei.com>
Subject: [PATCH -next v6 0/6]mm: page_table_check: add support on arm64 and riscv
Date: Tue, 26 Apr 2022 08:10:30 +0000	[thread overview]
Message-ID: <20220426081036.1374452-1-tongtiangen@huawei.com> (raw)

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/

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 | 59 +++++++++++++++++++++++---
 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, 155 insertions(+), 50 deletions(-)

-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

WARNING: multiple messages have this Message-ID (diff)
From: Tong Tiangen <tongtiangen@huawei.com>
To: Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	Dave Hansen <dave.hansen@linux.intel.com>, <x86@kernel.org>,
	"H. Peter Anvin" <hpa@zytor.com>,
	Pasha Tatashin <pasha.tatashin@soleen.com>,
	Anshuman Khandual <anshuman.khandual@arm.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will@kernel.org>,
	Paul Walmsley <paul.walmsley@sifive.com>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	Albert Ou <aou@eecs.berkeley.edu>
Cc: <linux-kernel@vger.kernel.org>, <linux-mm@kvack.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-riscv@lists.infradead.org>,
	Tong Tiangen <tongtiangen@huawei.com>,
	Kefeng Wang <wangkefeng.wang@huawei.com>,
	Guohanjun <guohanjun@huawei.com>
Subject: [PATCH -next v6 0/6]mm: page_table_check: add support on arm64 and riscv
Date: Tue, 26 Apr 2022 08:10:30 +0000	[thread overview]
Message-ID: <20220426081036.1374452-1-tongtiangen@huawei.com> (raw)

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/

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 | 59 +++++++++++++++++++++++---
 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, 155 insertions(+), 50 deletions(-)

-- 
2.25.1


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

             reply	other threads:[~2022-04-26  7:52 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-26  8:10 Tong Tiangen [this message]
2022-04-26  8:10 ` [PATCH -next v6 0/6]mm: page_table_check: add support on arm64 and riscv Tong Tiangen
2022-04-26  8:10 ` Tong Tiangen
2022-04-26  8:10 ` [PATCH -next v6 1/6] mm: page_table_check: using PxD_SIZE instead of PxD_PAGE_SIZE Tong Tiangen
2022-04-26  8:10   ` Tong Tiangen
2022-04-26  8:10   ` Tong Tiangen
2022-04-26  8:10 ` [PATCH -next v6 2/6] mm: page_table_check: move pxx_user_accessible_page into x86 Tong Tiangen
2022-04-26  8:10   ` Tong Tiangen
2022-04-26  8:10   ` Tong Tiangen
2022-04-26  8:10 ` [PATCH -next v6 3/6] mm: page_table_check: add hooks to public helpers Tong Tiangen
2022-04-26  8:10   ` Tong Tiangen
2022-04-26  8:10   ` Tong Tiangen
2022-04-26  8:10 ` [PATCH -next v6 4/6] mm: remove __HAVE_ARCH_PTEP_CLEAR in pgtable.h Tong Tiangen
2022-04-26  8:10   ` Tong Tiangen
2022-04-26  8:10   ` Tong Tiangen
2022-04-26  8:10 ` [PATCH -next v6 5/6] arm64/mm: Enable ARCH_SUPPORTS_PAGE_TABLE_CHECK Tong Tiangen
2022-04-26  8:10   ` Tong Tiangen
2022-04-26  8:10   ` Tong Tiangen
2022-04-29  6:18   ` Anshuman Khandual
2022-04-29  6:18     ` Anshuman Khandual
2022-04-29  6:18     ` Anshuman Khandual
2022-05-03  1:13     ` Tong Tiangen
2022-05-03  1:13       ` Tong Tiangen
2022-05-03  1:13       ` Tong Tiangen
2022-05-04 17:26       ` Catalin Marinas
2022-05-04 17:26         ` Catalin Marinas
2022-05-04 17:26         ` Catalin Marinas
2022-05-05  6:46         ` Tong Tiangen
2022-05-05  6:46           ` Tong Tiangen
2022-05-05  6:46           ` Tong Tiangen
2022-04-26  8:10 ` [PATCH -next v6 6/6] riscv/mm: " Tong Tiangen
2022-04-26  8:10   ` Tong Tiangen
2022-04-26  8:10   ` Tong Tiangen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220426081036.1374452-1-tongtiangen@huawei.com \
    --to=tongtiangen@huawei.com \
    --cc=akpm@linux-foundation.org \
    --cc=anshuman.khandual@arm.com \
    --cc=aou@eecs.berkeley.edu \
    --cc=bp@alien8.de \
    --cc=catalin.marinas@arm.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=guohanjun@huawei.com \
    --cc=hpa@zytor.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=mingo@redhat.com \
    --cc=palmer@dabbelt.com \
    --cc=pasha.tatashin@soleen.com \
    --cc=paul.walmsley@sifive.com \
    --cc=tglx@linutronix.de \
    --cc=wangkefeng.wang@huawei.com \
    --cc=will@kernel.org \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.