[PATCH v2] arm64: rsi: Correct type of realm_config::hash_algo
Kohei Enju
enju.kohei at fujitsu.com
Tue Oct 13 19:43:23 PDT 2026
The RMM specification defines RsiHashAlgorithm as an 8-bit type, but
realm_config::hash_algo is currently declared as unsigned long.
There are currently no upstream users of this field, so the mismatch
does not cause an observable issue today. However, a proposed series
adding support for Realm measurement registers uses this field and
exposes a bug caused by the incorrect type.
Change hash_algo to u8 to match the RMM specification while preserving
the size and layout of struct realm_config.
Link: https://lore.kernel.org/all/20260413084957.327661-4-sami.mujawar@arm.com/
Signed-off-by: Kohei Enju <enju.kohei at fujitsu.com>
---
Changes in v2:
- Drop the inner union and padding around hash_algo (Catalin)
- Link to v1: https://patch.msgid.link/20260929-cca-b4-rsi-fix-hash_algo-type-rebase-v1-1-6932cf0aa605@fujitsu.com
---
include/linux/arm-smccc-rsi.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/arm-smccc-rsi.h b/include/linux/arm-smccc-rsi.h
index fddb77986f70..cca881ddfdba 100644
--- a/include/linux/arm-smccc-rsi.h
+++ b/include/linux/arm-smccc-rsi.h
@@ -128,7 +128,7 @@ struct realm_config {
union {
struct {
unsigned long ipa_bits; /* Width of IPA in bits */
- unsigned long hash_algo; /* Hash algorithm */
+ u8 hash_algo; /* Hash algorithm */
};
u8 pad[0x200];
};
---
base-commit: de7b38167981bb92d8e4b2ad8ad9f151ce72a838
change-id: 20260929-cca-b4-rsi-fix-hash_algo-type-rebase-e341cd50d600
Best regards,
--
Kohei Enju <enju.kohei at fujitsu.com>
More information about the linux-arm-kernel
mailing list