lib: sbi: Add missing sscrind and sscfg extensions in sbi_hart_ext[]
authorClément Léger <cleger@rivosinc.com>
Wed, 20 Mar 2024 14:50:43 +0000 (15:50 +0100)
committerAnup Patel <anup@brainfault.org>
Wed, 10 Apr 2024 04:03:58 +0000 (09:33 +0530)
commit68bc031a76f09e730b29dbc02d832605b4aab219
tree6d5d0e0d0b14520e7456bd9d68346f6a08506af4
parenta7c5c2cbd27af430e80d894944c479e5e4df71b3
lib: sbi: Add missing sscrind and sscfg extensions in sbi_hart_ext[]

The sbi_hart_ext[] array is missing these two extensions ids. It is
expected that this array contains all the extensions declaration at the
same index of the SBI_HART_EXT_* define. Without this, when adding a new
extension, there is a mismatch between ids and extension names and it
can even display corrupted extension names.

Addresses-Coverity-ID: 1584994 Out-of-bounds read
Fixes: 6bb6b61c27eb ("lib: sbi: Add support for smcsrind and smcdeleg")
Signed-off-by: Clément Léger <cleger@rivosinc.com>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
lib/sbi/sbi_hart.c