From: Thorsten Blum <thorsten.blum@linux.dev>
To: Borislav Petkov <bp@alien8.de>
Cc: Thomas Gleixner <tglx@kernel.org>, Ingo Molnar <mingo@redhat.com>,
Dave Hansen <dave.hansen@linux.intel.com>,
x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>,
Changyuan Lyu <changyuanl@google.com>,
Andrew Morton <akpm@linux-foundation.org>,
Alexander Graf <graf@amazon.com>,
"Mike Rapoport (Microsoft)" <rppt@kernel.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] x86/boot/compressed: use boot_kstrtoul() for hugepages= parsing
Date: Mon, 4 May 2026 12:27:50 +0200 [thread overview]
Message-ID: <afh0pmlHJt-gwtUn@linux.dev> (raw)
In-Reply-To: <20260504101439.GAafhxjwarRu2Htnny@fat_crate.local>
On Mon, May 04, 2026 at 12:14:39PM +0200, Borislav Petkov wrote:
> On Mon, Apr 27, 2026 at 10:17:58AM +0200, Thorsten Blum wrote:
> > Could you give this another look now that [1] is in mainline and 'val'
> > can no longer be NULL?
>
> I did but looking at arch/x86/boot/string.c - we have kstrtoull() - notice the
> two "ll" - there already because we copied it from kernel proper.
>
> So, I'm thinking you should rename it to boot_kstrtoull() in a pre-patch and
> then use it in kaslr.c.
>
> Right?
Keep in mind that max_gb_huge_pages is an unsigned long (not ull), so I
think boot_kstrtoul() is the better fit.
The last sentence in my commit message also mentions that
boot_kstrtoul() avoids casting the parsed value from ull to ul.
Thanks,
Thorsten
next prev parent reply other threads:[~2026-05-04 10:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-09 16:15 [PATCH v2] x86/boot/compressed: use boot_kstrtoul() for hugepages= parsing Thorsten Blum
2026-04-27 8:17 ` Thorsten Blum
2026-05-04 10:14 ` Borislav Petkov
2026-05-04 10:27 ` Thorsten Blum [this message]
2026-05-04 12:14 ` Borislav Petkov
2026-05-04 12:23 ` [tip: x86/cleanups] x86/boot/compressed: Use " tip-bot2 for Thorsten Blum
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=afh0pmlHJt-gwtUn@linux.dev \
--to=thorsten.blum@linux.dev \
--cc=akpm@linux-foundation.org \
--cc=bp@alien8.de \
--cc=changyuanl@google.com \
--cc=dave.hansen@linux.intel.com \
--cc=graf@amazon.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=rppt@kernel.org \
--cc=tglx@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox