linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Pasha Tatashin <pasha.tatashin@soleen.com>
To: Rohan McLure <rmclure@linux.ibm.com>
Cc: linuxppc-dev@lists.ozlabs.org, mpe@ellerman.id.au,
	 christophe.leroy@csgroup.eu, linux-mm@kvack.org,
	 linux-riscv@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org,  x86@kernel.org
Subject: Re: [PATCH v12 10/11] powerpc: mm: Use set_pte_at_unchecked() for early-boot / internal usages
Date: Wed, 3 Apr 2024 20:12:07 -0400	[thread overview]
Message-ID: <CA+CK2bBeJWo_8kNGr5XoTbLV2gQHL9E=gmv1BxD+d4sKF-mjqw@mail.gmail.com> (raw)
In-Reply-To: <20240402051154.476244-11-rmclure@linux.ibm.com>

On Tue, Apr 2, 2024 at 1:13 AM Rohan McLure <rmclure@linux.ibm.com> wrote:
>
> In the new set_ptes() API, set_pte_at() (a special case of set_ptes())
> is intended to be instrumented by the page table check facility. There
> are however several other routines that constitute the API for setting
> page table entries, including set_pmd_at() among others. Such routines
> are themselves implemented in terms of set_ptes_at().
>
> A future patch providing support for page table checking on powerpc
> must take care to avoid duplicate calls to
> page_table_check_p{te,md,ud}_set(). Allow for assignment of pte entries
> without instrumentation through the set_pte_at_unchecked() routine
> introduced in this patch.
>
> Cause API-facing routines that call set_pte_at() to instead call
> set_pte_at_unchecked(), which will remain uninstrumented by page
> table check. set_ptes() is itself implemented by calls to
> __set_pte_at(), so this eliminates redundant code.
>
> Also prefer set_pte_at_unchecked() in early-boot usages which should not be
> instrumented.

Would not the early-boot usage be all kernel mappings that are ignored
by page table check anways? Sounds like it is better to only use the
set_pte_at_unchecked() version where it is really needed, which is to
avoid double counting. This will keep the usage of this function only
for one purpose that is easy to follow.

Pasha


  reply	other threads:[~2024-04-04  0:12 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-02  5:11 [PATCH v12 00/11] Support page table check PowerPC Rohan McLure
2024-04-02  5:11 ` [PATCH v12 02/11] mm/page_table_check: Reinstate address parameter in [__]page_table_check_pmd_set() Rohan McLure
2024-04-03 23:19   ` Pasha Tatashin
2024-04-02  5:11 ` [PATCH v12 04/11] mm/page_table_check: Reinstate address parameter in [__]page_table_check_pud_clear() Rohan McLure
2024-04-03 23:21   ` Pasha Tatashin
2024-04-02  5:11 ` [PATCH v12 07/11] mm: Provide address parameter to p{te,md,ud}_user_accessible_page() Rohan McLure
2024-04-03 23:48   ` Pasha Tatashin
2024-04-02  5:11 ` [PATCH v12 09/11] poweprc: mm: Implement *_user_accessible_page() for ptes Rohan McLure
2024-04-04  0:00   ` Pasha Tatashin
2024-04-02  5:11 ` [PATCH v12 10/11] powerpc: mm: Use set_pte_at_unchecked() for early-boot / internal usages Rohan McLure
2024-04-04  0:12   ` Pasha Tatashin [this message]
2024-04-02  5:11 ` [PATCH v12 11/11] powerpc: mm: Support page table check Rohan McLure
2024-04-04  0:16   ` Pasha Tatashin
     [not found] ` <20240402051154.476244-2-rmclure@linux.ibm.com>
2024-04-03 23:17   ` [PATCH v12 01/11] mm/page_table_check: Reinstate address parameter in [__]page_table_check_pud_set() Pasha Tatashin
2024-04-03 23:24 ` [PATCH v12 00/11] Support page table check PowerPC Pasha Tatashin
     [not found] ` <20240402051154.476244-6-rmclure@linux.ibm.com>
2024-04-03 23:26   ` [PATCH v12 05/11] mm/page_table_check: Reinstate address parameter in [__]page_table_check_pmd_clear() Pasha Tatashin
     [not found] ` <20240402051154.476244-7-rmclure@linux.ibm.com>
2024-04-03 23:46   ` [PATCH v12 06/11] mm/page_table_check: Reinstate address parameter in [__]page_table_check_pte_clear() Pasha Tatashin
     [not found] ` <20240402051154.476244-9-rmclure@linux.ibm.com>
2024-04-03 23:55   ` [PATCH v12 08/11] powerpc: mm: Add pud_pfn() stub Pasha Tatashin
2024-06-18 13:09 ` [PATCH v12 00/11] Support page table check PowerPC LEROY Christophe
2024-07-29  8:27   ` Andrew Donnellan

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='CA+CK2bBeJWo_8kNGr5XoTbLV2gQHL9E=gmv1BxD+d4sKF-mjqw@mail.gmail.com' \
    --to=pasha.tatashin@soleen.com \
    --cc=christophe.leroy@csgroup.eu \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --cc=rmclure@linux.ibm.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox