diff options
author | Pierre Gondois <pierre.gondois@arm.com> | 2023-01-04 19:30:26 +0100 |
---|---|---|
committer | Sudeep Holla <sudeep.holla@arm.com> | 2023-01-18 09:58:31 +0000 |
commit | de0df442ee49cb1f6ee58f3fec5dcb5e5eb70aab (patch) | |
tree | a205974497e42d131301082ff540f3526700e7f5 /drivers/acpi | |
parent | 8844c3df001bc1d8397fddea341308da63855d53 (diff) | |
download | linux-stable-de0df442ee49cb1f6ee58f3fec5dcb5e5eb70aab.tar.gz linux-stable-de0df442ee49cb1f6ee58f3fec5dcb5e5eb70aab.tar.bz2 linux-stable-de0df442ee49cb1f6ee58f3fec5dcb5e5eb70aab.zip |
cacheinfo: Check 'cache-unified' property to count cache leaves
The DeviceTree Specification v0.3 specifies that the cache node
'[d-|i-|]cache-size' property is required. The 'cache-unified'
property is specifies whether the cache level is separate
or unified.
If the cache-size property is missing, no cache leaves is accounted.
This can lead to a 'BUG: KASAN: slab-out-of-bounds' [1] bug.
Check 'cache-unified' property and always account for at least
one cache leaf when parsing the device tree.
[1] https://lore.kernel.org/all/0f19cb3f-d6cf-4032-66d2-dedc9d09a0e3@linaro.org/
Reported-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
Tested-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20230104183033.755668-4-pierre.gondois@arm.com
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Diffstat (limited to 'drivers/acpi')
0 files changed, 0 insertions, 0 deletions