From: "David Hildenbrand (Arm)" <david@kernel.org>
To: Matthew Wilcox <willy@infradead.org>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Anshuman Khandual <anshuman.khandual@arm.com>,
linux-mm@kvack.org, Rasmus Villemoes <linux@rasmusvillemoes.dk>,
Sergey Senozhatsky <senozhatsky@chromium.org>,
Petr Mladek <pmladek@suse.com>,
Steven Rostedt <rostedt@goodmis.org>,
Jonathan Corbet <corbet@lwn.net>,
Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org
Subject: Re: [RFC V2 0/3] lib/vsprintf: Add support for pgtable entries
Date: Fri, 12 Jun 2026 13:14:12 +0200 [thread overview]
Message-ID: <3603c37b-95b1-4d29-ab6f-fa3360dc17db@kernel.org> (raw)
In-Reply-To: <aisOi1B0o5KYyaQo@casper.infradead.org>
On 6/11/26 21:37, Matthew Wilcox wrote:
> On Thu, Jun 11, 2026 at 10:33:35PM +0300, Andy Shevchenko wrote:
>> On Thu, Jun 11, 2026 at 08:15:57PM +0100, Matthew Wilcox wrote:
>>>
>>> You didn't address my objection here:
>>>
>>> https://lore.kernel.org/linux-mm/aFQP8LzVMctf6XH5@casper.infradead.org/
>>>
>>> ie there is now no typechecking possible. So you've made it more
>>> dangerous. I reiterate my NACK to the concept, not to the implementation.
>>
>> But this is more of a global question, how do we check the validity of
>> the parameters of pointer extensions in the kernel? Does anybody go to
>> commit into GCC plugin or so for this job?
>
> I agree that it's a global question that it would be great for somebody
> to answer. But it's specifically a problem for this patchset because:
>
> - It's really easy to get confused about which page table level you're
> working on. And hugetlbfs deliberately increases that confusion.
Yeah ... so far I was assuming that for hugetlb, all relevant entries (what we
call a PTE although it isn't ....) would have to be the same size. I mean, at
least in the callers they are the same size (pte_t)
> - Different levels of the page tables actually do have different sizes
> on some architectures, so if you think you're looking at a pointer to a
> 64-bit quantity when it's really a pointer to a 32-bit quantity, things
> Will Go Wrong (or vice-versa. And some architctures are big-endian)
I see your point with the pass-by-pointer.
> - But on x86-64, Everything Is Fine because all levels of the page table
> are basically identical, so you'll never notice there's a problem.
I assume on most architectures.
Let's see if we can stop printing that information completely, so we can avoid
messing with this at all.
--
Cheers,
David
prev parent reply other threads:[~2026-06-12 11:14 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-10 4:35 [RFC V2 0/3] lib/vsprintf: Add support for pgtable entries Anshuman Khandual
2026-06-10 4:35 ` [RFC V2 1/3] " Anshuman Khandual
2026-06-10 11:13 ` Usama Arif
2026-06-11 5:15 ` Anshuman Khandual
2026-06-11 7:17 ` Andy Shevchenko
2026-06-11 9:50 ` Anshuman Khandual
2026-06-11 18:59 ` Andy Shevchenko
2026-06-10 4:35 ` [RFC V2 2/3] kunit: printf: Add test " Anshuman Khandual
2026-06-10 4:35 ` [RFC V2 3/3] mm: Replace pgtable entry prints with new format Anshuman Khandual
2026-06-11 11:32 ` David Hildenbrand (Arm)
2026-06-12 11:08 ` David Hildenbrand (Arm)
2026-06-11 19:15 ` [RFC V2 0/3] lib/vsprintf: Add support for pgtable entries Matthew Wilcox
2026-06-11 19:33 ` Andy Shevchenko
2026-06-11 19:37 ` Matthew Wilcox
2026-06-12 11:14 ` David Hildenbrand (Arm) [this message]
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=3603c37b-95b1-4d29-ab6f-fa3360dc17db@kernel.org \
--to=david@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=anshuman.khandual@arm.com \
--cc=corbet@lwn.net \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux@rasmusvillemoes.dk \
--cc=pmladek@suse.com \
--cc=rostedt@goodmis.org \
--cc=senozhatsky@chromium.org \
--cc=willy@infradead.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