Linux s390 Architecture development
 help / color / mirror / Atom feed
From: Muhammad Usama Anjum <usama.anjum@arm.com>
To: "David Hildenbrand (Arm)" <david@kernel.org>,
	Alexander Gordeev <agordeev@linux.ibm.com>
Cc: usama.anjum@arm.com, Zi Yan <ziy@nvidia.com>,
	Pedro Falcato <pfalcato@suse.de>,
	Ryan Roberts <ryan.roberts@arm.com>,
	Lorenzo Stoakes <ljs@kernel.org>,
	linux-mm@kvack.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org,
	Andrew Morton <akpm@linux-foundation.org>,
	"Liam R. Howlett" <liam@infradead.org>,
	Mike Rapoport <rppt@kernel.org>,
	Anshuman Khandual <anshuman.khandual@arm.com>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will@kernel.org>,
	Samuel Holland <samuel.holland@sifive.com>,
	linux-s390@vger.kernel.org
Subject: Re: mm: opaque hardware page-table entry handles
Date: Thu, 23 Jul 2026 18:01:49 +0100	[thread overview]
Message-ID: <47b4e62e-b001-465c-9c3b-ea0636925387@arm.com> (raw)
In-Reply-To: <716f73c1-41cc-48a5-b0e1-a47403a30da1@kernel.org>

On 23/07/2026 5:38 pm, David Hildenbrand (Arm) wrote:
> 
>> So after the conversion, it doesn't makes sense to keep STRICT_MM_TYPECHECKS
>> around. Please correct me if I'm wrong.
>>
>> This brings another thing in my mind that in ideal world we would just
>> turn STRICT_MM_TYPECHECKS on for all arches all the time. But the problem
>> with it is that STRICT_MM_TYPECHECKS defines pte_t which will stay double
>> meaning still. So we want sort of STRICT_MM_TYPECHECKS with different name
>> and separate stack and hardware types.
> 
> I think STRICT_MM_TYPECHECKS is also to avoid catching when passing a pte_t into
> a function that consumes a pmd_t, and vice versa.
> 
> STRICT_MM_TYPECHECKS makes the compiler generate worse code today, which is why
> we don't enable it always.
> 
>>
>>>
>>> We would like to keep it, and I guess some other architectures too.
>> David had summarized it well. We'll convert generic code to use hw_p*_t
>> types which would be typedef to p*_t for those architectures which don't
>> care about. But if an architecture wants to interpret these types
>> differently or want to make sure the type is enforced and not directly
>> dereferenced, they need to convert the arch code a well. But it can be
>> done slowly.
> 
> I think what Alexander meant is: they want to keep STRICT_MM_TYPECHECKS (or
> something that achieves something similar :) ). So as long as that keeps on
> working, all good :)
Thank you for clarifying.

It has been a month since I started this discussion. We don't have any
disagreement on it. Should I proceed to post first part patch series considering
most people must already have viewed these emails and are on-board with it?

-- 
Thanks,
Usama


  reply	other threads:[~2026-07-23 17:03 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <74182e50-b54f-4d2d-a27f-3a59a538d6bc@arm.com>
     [not found] ` <31d36023-d728-4eee-90f8-158c7066f565@kernel.org>
     [not found]   ` <e22407d8-4509-4a53-9ba4-491b9d5c5ef7@arm.com>
     [not found]     ` <4bfeb697-9c1f-4316-96bb-9bfd66f959df@kernel.org>
     [not found]       ` <6110202c-057b-4701-8c04-1a76ee7bb9ab@arm.com>
2026-07-21 12:40         ` mm: opaque hardware page-table entry handles Alexander Gordeev
2026-07-23  8:21           ` Muhammad Usama Anjum
2026-07-23 16:38             ` David Hildenbrand (Arm)
2026-07-23 17:01               ` Muhammad Usama Anjum [this message]
2026-07-24  9:30                 ` Pedro Falcato
2026-07-24 10:34                   ` Muhammad Usama Anjum
2026-07-24 12:57                     ` Pedro Falcato
2026-07-24  6:47             ` Alexander Gordeev
2026-07-27  7:11               ` Alexander Gordeev

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=47b4e62e-b001-465c-9c3b-ea0636925387@arm.com \
    --to=usama.anjum@arm.com \
    --cc=agordeev@linux.ibm.com \
    --cc=akpm@linux-foundation.org \
    --cc=anshuman.khandual@arm.com \
    --cc=catalin.marinas@arm.com \
    --cc=david@kernel.org \
    --cc=liam@infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=ljs@kernel.org \
    --cc=pfalcato@suse.de \
    --cc=rppt@kernel.org \
    --cc=ryan.roberts@arm.com \
    --cc=samuel.holland@sifive.com \
    --cc=will@kernel.org \
    --cc=ziy@nvidia.com \
    /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