[PATCH] arm64: Remove checks for broken Cavium HW from the PI code
Ada Couprie Diaz
ada.coupriediaz at arm.com
Wed Apr 16 06:05:46 PDT 2025
On 16/04/2025 13:35, Marc Zyngier wrote:
> Calling into the MIDR checking framework from the PI code has recently
> become much harder, due to the new fancy "multi-MIDR" support that
> relies on tables being populated at boot time, but not that early that
> they are available to the PI code. There are additional issues with
> this framework, as the code really isn't position independend *at all*.
>
> This leads to some ugly breakages, as reported by Ada.
>
> It so appears that the only reason for the PI code to call into the
> MIDR checking code is to cope with The Most Broken ARM64 System Ever,
> aka Cavium ThunderX, which cannot deal with nG attributes that result
> of the combination of KASLR and KPTI as a consequence of Erratum 27456.
>
> Rather than adding extra complexity for something that is actually
> a very dead horse, let's simply drop that check. On my own machine,
> the firmware doesn't provide a KASLR seed, preventing the pathological
> case to show up.
>
> And if someone does have a broken box that passes a seed to the kernel,
> "nokaslr" on the command-line is an easy enough workaround.
>
> Fixes: c8c2647e69bed ("arm64: Make _midr_in_range_list() an exported function")
> Reported-by: Ada Couprie Diaz <ada.coupriediaz at arm.com>
> Signed-off-by: Marc Zyngier <maz at kernel.org>
> Link: https://lore.kernel.org/r/3d97e45a-23cf-419b-9b6f-140b4d88de7b@arm.com
> Cc: Catalin Marinas <catalin.marinas at arm.com>
> Cc: Will Deacon <will at kernel.org>
> Cc: Shameer Kolothum <shameerali.kolothum.thodi at huawei.com>
> Cc: Oliver Upton <oliver.upton at linux.dev>
Tested-by: Ada Couprie Diaz <ada.coupriediaz at arm.com>
Thanks for the fix ! I can confirm that it resolves all boot failures I
was observing previously.
No instances of firmware seeding KASRL in the couple of machines I am
testing either.
Regards,
Ada
More information about the linux-arm-kernel
mailing list