From: "David Hildenbrand (Arm)" <david@kernel.org>
To: Muhammad Usama Anjum <usama.anjum@arm.com>,
Alexander Gordeev <agordeev@linux.ibm.com>
Cc: 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:38:02 +0200 [thread overview]
Message-ID: <716f73c1-41cc-48a5-b0e1-a47403a30da1@kernel.org> (raw)
In-Reply-To: <3c21586c-0ffe-4ebc-97f1-803e8acfc5c1@arm.com>
> 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 :)
--
Cheers,
David
next prev parent reply other threads:[~2026-07-23 16:38 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-24 14:09 mm: opaque hardware page-table entry handles Usama Anjum
2026-06-24 15:52 ` Zi Yan
2026-06-24 22:39 ` Muhammad Usama Anjum
2026-06-24 19:25 ` Pedro Falcato
2026-06-25 10:50 ` Muhammad Usama Anjum
2026-06-25 11:08 ` Pedro Falcato
2026-06-25 12:15 ` Muhammad Usama Anjum
[not found] ` <31d36023-d728-4eee-90f8-158c7066f565@kernel.org>
2026-07-06 12:52 ` Muhammad Usama Anjum
2026-07-07 13:17 ` David Hildenbrand (Arm)
2026-07-15 16:15 ` Muhammad Usama Anjum
2026-07-21 12:40 ` Alexander Gordeev
2026-07-23 8:21 ` Muhammad Usama Anjum
2026-07-23 16:38 ` David Hildenbrand (Arm) [this message]
2026-07-23 17:01 ` Muhammad Usama Anjum
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
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=716f73c1-41cc-48a5-b0e1-a47403a30da1@kernel.org \
--to=david@kernel.org \
--cc=agordeev@linux.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=anshuman.khandual@arm.com \
--cc=catalin.marinas@arm.com \
--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=usama.anjum@arm.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