bootstat: handle a bad bit error rate issue with pstore
Create a private rfind that allows a fuzzy match based on a bit error rate (BER) of 1 every 8 bits. last kmsg is affected by pstore ramoops backing that suffers from data corruption. Add some additional validation based on possible data corruption scenarios, as a noisy match means higher chance of noisy data. Noisy data notably can affect the battery level detection, but do not typically result in false positives. Battery level, or failure, is the responsibility of the BatteryStats service, providing a positive signal and strong device-independent algorithm. The checking done in bootstat is likely to be deprecated in favour of an API request to BatteryStats once their algorithms deal with surprise outages due to aging. The kernel logging heuristic and BER fixup handily deals with a prevalent issue where some bootloaders failure to properly notify us of panics. This is where the gains are noticed with this improvement. Test: system/core/bootstat/boot_reason_test.sh Bug: 63736262 Change-Id: I93b4210f12fb47c5c036f4d6eb4cafeee4896d35
Loading
Please register or sign in to comment