Attention is currently required from: Julius Werner, Yidi Lin, Yu-Ping Wu.
Hello Julius Werner, Yu-Ping Wu, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/78888?usp=email
to look at the new patch set (#5).
The following approvals got outdated and were removed: Code-Review+2 by Yu-Ping Wu
Change subject: libpayload/libc/time: Fix possible overflow in multiplication ......................................................................
libpayload/libc/time: Fix possible overflow in multiplication
The value from raw_read_cntfrq_el0() could be large enough to cause overflow when multiplied by USECS_PER_SEC. To prevent this, both USECS_PER_SEC and hz can be reduced by dividing them by their GCD.
BUG=b:307790895 TEST=boot to kernel and check the timestamps from `cbmem`
Change-Id: Ia55532490651fcf47128b83a8554751f050bcc89 Signed-off-by: Yidi Lin yidilin@chromium.org --- M payloads/libpayload/drivers/timer/arm64_arch_timer.c M payloads/libpayload/drivers/timer/rdtsc.c M payloads/libpayload/include/libpayload.h M payloads/libpayload/libc/time.c 4 files changed, 14 insertions(+), 8 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/88/78888/5