arm64: idreg-override: Avoid kstrtou64() to parse a single hex digit
authorArd Biesheuvel <ardb@kernel.org>
Wed, 29 Nov 2023 11:16:15 +0000 (12:16 +0100)
committerWill Deacon <will@kernel.org>
Tue, 12 Dec 2023 11:13:53 +0000 (11:13 +0000)
commitea48626f8f0efc697555d17bb5853df92461e280
tree6ff6aa527962921780555a352563fac56bec15e5
parent060260a6be47ae163b0c71a6d0902d065b68f3d2
arm64: idreg-override: Avoid kstrtou64() to parse a single hex digit

All ID register value overrides are =0 with the exception of the nokaslr
pseudo feature which uses =1. In order to remove the dependency on
kstrtou64(), which is part of the core kernel and no longer usable once
we move idreg-override into the early mini C runtime, let's just parse a
single hex digit (with optional leading 0x) and set the output value
accordingly.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Link: https://lore.kernel.org/r/20231129111555.3594833-62-ardb@google.com
Signed-off-by: Will Deacon <will@kernel.org>
arch/arm64/kernel/idreg-override.c