Attention is currently required from: Konrad Adamczyk, Raul Rangel, Jakub Czapiga, Grzegorz Bernacki.
Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/74742 )
Change subject: util/cbmem: Add REG_NEWLINE flag to fix matching pattern ......................................................................
Patch Set 1: Code-Review+2
(1 comment)
Commit Message:
https://review.coreboot.org/c/coreboot/+/74742/comment/8c92478a_70056e57 PS1, Line 13: REG_NEWLINE
Thanks for the history and the great explanation.
Wow, great find, thanks!
So just to clarify my understanding, the switch to REG_EXTENDED actually has nothing to do with the problem, it doesn't affect the newline behavior. And the fact that it accidentally matches all the way to `"Starting depthcharge...\n"` is also irrelevant to the user-visible bug (even though it is unintended, and a bit wasteful). The only real issue is that the `.?` introduced may match a newline, and this will result in `cbmem -2` not displaying the correct boot iff the log does not contain loglevel markers.
Part of the problem was also that CB:33779 introduced the `.*` when the original patch had used `[^\n]*` for the same purpose. I guess REG_NEWLINE is a better way to fix the same problem, though. Maybe we should change the `[^\n]*` to `.*` for consistency now, because it doesn't make a difference anymore.