Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/38421 )
Change subject: commonlib/bsd: Add new CBFS core implementation
......................................................................
Patch Set 13:
(2 comments)
https://review.coreboot.org/c/coreboot/+/38421/11/src/commonlib/bsd/cbfs_pri...
File src/commonlib/bsd/cbfs_private.c:
https://review.coreboot.org/c/coreboot/+/38421/11/src/commonlib/bsd/cbfs_pri...
PS11, Line 75: offset + sizeof(mdata.h), todo) != todo)
Why not use an assert() here? I've decided to use assertions when I've already verified the conditio […]
Uhh... yeah, sure, why not. Unfortunately GCC is surprisingly bad at analyzing this and can't eliminate it (I filed https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97434 because I was curious). But I guess one more check shouldn't break the bank.
https://review.coreboot.org/c/coreboot/+/38421/11/src/commonlib/bsd/cbfs_pri...
PS11, Line 117: const size_t todo = be32toh(src->h.offset) - already_read;
cbfs_copy_fill_metadata() is only meant to be called from a |walker| callback to cbfs_walk(), where […]
Added an assert() here as well.
--
To view, visit
https://review.coreboot.org/c/coreboot/+/38421
To unsubscribe, or for help writing mail filters, visit
https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ica64c1751fa37686814c0247460c399261d5814c
Gerrit-Change-Number: 38421
Gerrit-PatchSet: 13
Gerrit-Owner: Julius Werner
jwerner@chromium.org
Gerrit-Reviewer: Aaron Durbin
adurbin@chromium.org
Gerrit-Reviewer: Angel Pons
th3fanbus@gmail.com
Gerrit-Reviewer: HAOUAS Elyes
ehaouas@noos.fr
Gerrit-Reviewer: Julius Werner
jwerner@chromium.org
Gerrit-Reviewer: Nico Huber
nico.h@gmx.de
Gerrit-Reviewer: Patrick Georgi
pgeorgi@google.com
Gerrit-Reviewer: Patrick Rudolph
patrick.rudolph@9elements.com
Gerrit-Reviewer: build bot (Jenkins)
no-reply@coreboot.org
Gerrit-CC: Patrick Rudolph
siro@das-labor.org
Gerrit-CC: Paul Menzel
paulepanter@users.sourceforge.net
Gerrit-CC: Philipp Deppenwiese
zaolin.daisuki@gmail.com
Gerrit-Comment-Date: Thu, 15 Oct 2020 01:50:09 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Angel Pons
th3fanbus@gmail.com
Comment-In-Reply-To: Julius Werner
jwerner@chromium.org
Comment-In-Reply-To: Aaron Durbin
adurbin@chromium.org
Gerrit-MessageType: comment