diff options
| author | Heinrich Schuchardt <[email protected]> | 2021-06-05 14:22:43 +0200 |
|---|---|---|
| committer | Anup Patel <[email protected]> | 2021-06-11 13:59:48 +0530 |
| commit | 1da3d80b5bc074fce077adc47c97f3179c0addd9 (patch) | |
| tree | b1433f7e4f61955c7d62bb03a1603a5a449a6ff5 /lib/utils/timer | |
| parent | 434198e3be65732d2a326b369377d4db732c1af8 (diff) | |
lib: sbi_scratch: zero out scratch memory on all harts
In sbi_scratch_init() we determine the last hart. The index of the last
hart cannot exceed SBI_HARTMASK_MAX_BITS - 1. We should not initialize
last_hartid_having_scratch to a higher number to avoid buffer overflows
when using this value before calling sbi_scratch_init().
When allocating scratch memory in sbi_scratch_alloc_offset() we zero out
the allocated memory for all harts except for the last one. We should not
skip the last hart.
Signed-off-by: Heinrich Schuchardt <[email protected]>
Reviewed-by: Anup Patel <[email protected]>
Diffstat (limited to 'lib/utils/timer')
0 files changed, 0 insertions, 0 deletions
