Re: [BUG] ARM64 regression: NULL pointer dereference in arm_smccc_version_init+0x90/0x1ac

Will Deacon
2025-01-30T11:45:11Z

On Fri, Jan 24, 2025 at 03:52:10PM +0100, Emanuele Rocca wrote:
> longterm kernel 6.1.123 crashes early when booting on the Lenovo Thinkpad X13s
> with the following error:
>
> Unable to handle kernel NULL pointer dereference at virtual address 0000000000000264
>
> pc: arm_smccc_version_init+0x90/0x1ac

Please can you share the full crash log?

> According to faddr2line, that is line 31 of smccc.c:
>
> arm_smccc_version_init+0x90/0x1ac:
> arm_smccc_version_init at debian/build/build_arm64_none_arm64/drivers/firmware/smccc/smccc.c:31
>
> 22 void __init arm_smccc_version_init(u32 version, enum arm_smccc_conduit conduit)
> 23 {
> 24 struct arm_smccc_res res;
> 25
> 26 smccc_version = version;
> 27 smccc_conduit = conduit;
> 28
> 29 smccc_trng_available = smccc_probe_trng();
> 30
> 31 if ((smccc_version >= ARM_SMCCC_VERSION_1_2) &&
>
> This is with kernel 6.1.123. The last known good kernel I have available right
> now is 6.1.119. In the 6.1.120 changelog I see the following commit which seems
> potentially related?
>
> https://lore.kernel.org/all/20241106160448.2712997-1-mark.rutland@arm.com/
>
> That's stable commit [1].

I can't see anything wrong with that patch but if you have reason to
suspect that it's broken can you try reverting it to see if the problem
disappears?

Will