From: Emanuele Rocca <emanuele.rocca@arm.com>
To: Will Deacon <will@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [BUG] ARM64 regression: NULL pointer dereference in arm_smccc_version_init+0x90/0x1ac
Date: Wed, 5 Feb 2025 17:50:13 +0100 [thread overview]
Message-ID: <Z6OWxUFxkK9plrm0@NH27D9T0LF> (raw)
In-Reply-To: <20250204100014.GA777@willie-the-truck>
Hello Will,
On 2025-02-04 10:00, Will Deacon wrote:
> Emanuele -- could you hack the code to poison the other unused result
> registers () and see if they are also cleared? ARM_SMCCC_TRNG_VERSION
> looks like a 32-bit call, so that would be W1-W7 afaict.
Not sure if this is exactly what you are asking for, but right before
the call to smccc_probe_trng():
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/drivers/firmware/smccc/smccc.c?h=v6.1.124#n29
I did the following to write to all registers. First I tried W1-W7, then
I went for W1-W17 too:
register unsigned long w1 asm("w1");
[...]
register unsigned long w17 asm("w17");
asm volatile(
"mov w1, #0x1234\n"
"mov w2, #0x2234\n"
[...]
"mov w16, #0x0234\n"
"mov w17, #0x1234\n"
);
The values I wrote were not overwritten, see https://people.debian.org/~ema/w1-w17.jpg
next prev parent reply other threads:[~2025-02-05 16:58 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-24 14:52 [BUG] ARM64 regression: NULL pointer dereference in arm_smccc_version_init+0x90/0x1ac Emanuele Rocca
2025-01-30 11:43 ` Will Deacon
2025-02-05 10:35 ` Emanuele Rocca
2025-02-06 13:08 ` Will Deacon
2025-01-30 12:19 ` Mark Rutland
2025-01-30 14:56 ` Emanuele Rocca
2025-01-31 12:41 ` Will Deacon
2025-01-31 13:54 ` Mark Rutland
2025-02-04 10:00 ` Will Deacon
2025-02-05 16:50 ` Emanuele Rocca [this message]
2025-02-06 13:11 ` Will Deacon
2025-02-06 16:57 ` Emanuele Rocca
2025-03-13 22:08 ` Will Deacon
2025-09-26 10:36 ` Dan Carpenter
2025-09-26 11:03 ` Will Deacon
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=Z6OWxUFxkK9plrm0@NH27D9T0LF \
--to=emanuele.rocca@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=mark.rutland@arm.com \
--cc=will@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