Tim Wawrzynczak has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/45411 )
Change subject: soc/intel/common/block: Skip saving VBNV data if ctx is NULL ......................................................................
Patch Set 2:
Patch Set 2:
Patch Set 2:
Patch Set 2:
Since we just use `vboot_get_context()` all over the place, often even doing `vboot_get_context()->flags` or other, maybe it would be more useful for static verification to just add an assert(vboot_ctx) in `src/security/vboot/common.c` at the end of `vboot_get_context()` just before the final return? Then we shouldn't need to add it everywhere to convince static analyzers it's non-NULL
Why are there vb2 calls which clearly have a side-effect inside assert statements?
It does look fishy, but technically, only one copy of the argument appears in the preprocessed source
Well 2 appear, but GCC will eliminate one at build-time