Aaron Durbin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/36300 )
Change subject: vboot: use vboot persistent context ......................................................................
Patch Set 7:
(2 comments)
https://review.coreboot.org/c/coreboot/+/36300/7/src/security/vboot/common.c File src/security/vboot/common.c:
https://review.coreboot.org/c/coreboot/+/36300/7/src/security/vboot/common.c... PS7, Line 75: (void *)wd + wd->buffer_offset This is in here all over the place. Can you please provide a wrapper that provides the address of the buffer to use instead of open coding this everywhere?
https://review.coreboot.org/c/coreboot/+/36300/7/src/security/vboot/common.c... PS7, Line 77: car_get_var_ptr(&vboot_ctx) I apologize if you guys have been through this already. vb2_shared_data is a known entity to vboot users. i.e. we know sizes and fields names. This change is ensuring we don't know that and deferring to vboot_reference to get to:
1. get the address of vb2_contetxt 2. obtain vb2_shared_data from vb2_context when we know it's inside of vb2_shared data.
So this CL is trying to remove the assumption that the memory at wd->buffer_offset could be anything so we have no idea that it's actually vb2_shared_data?