2021-03-18 12:58:16 |
Liming Sun |
description |
On Bluefield platforms, the 'bfrshlog' script can be used to write a string into the internal rshim logging buffer which has size 1KB. When the buffer is full, the intention is to drop the new data. However, due to a bug, the buffer could be overwritten and wrap-around when full.
SRU Justification:
[Impact]
* When 'cat /dev/rshim/misc' with DISPLAY_LEVEL set to 2, the logging buffer could be potentially displayed as empty when it's full.
[Fix]
* Add the check properly to make sure the buffer won't wrap-around.
[Test Case]
* Run "bfrshlog <some-message>" repeatedly and check the /dev/rshim/misc with DISPLAY_LEVEL set to 2 in this file. The buffer shouldn't be overwritten or wrap-around.
[Regression Potential]
* Yes, it should be easy to add regression.
[Other]
* N/A |
On Bluefield platforms, the 'bfrshlog' script can be used to write a string into the internal rshim logging buffer which has size 1KB. When the buffer is full, the intention is to drop the new data. However, due to a bug, the buffer could be overwritten and wrap-around when full.
SRU Justification:
[Impact]
* When 'cat /dev/rshim0/misc' with DISPLAY_LEVEL set to 2, the logging buffer could be potentially displayed as empty when it's full.
[Fix]
* Add the check properly to make sure the buffer won't wrap-around.
[Test Case]
* Run "bfrshlog <some-message>" repeatedly and check the /dev/rshim0/misc with DISPLAY_LEVEL set to 2 in this file. The buffer shouldn't be overwritten or wrap-around.
[Regression Potential]
* The rshim log can be displayed by setting "DISPLAY_LEVEL 2" in /dev/rshim0/misc, then "cat /dev/rshim0/misc" to see the log messages. The log should contains ATF/UEFI booting progress and user logs from Linux applications by using the bfrshlog script. In any case, the log should always start from ATF logging, not overwritten or wrap-around. When the buffer is full, new data will be dropped.
[Other]
* N/A |
|