Attention is currently required from: Ravi Kumar Bokka. Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/63026 )
Change subject: soc/qualcomm/common: verify size of memchipinfo structure ......................................................................
Patch Set 4:
(5 comments)
File src/soc/qualcomm/common/qclib.c:
https://review.coreboot.org/c/coreboot/+/63026/comment/619b449a_fa82c75b PS3, Line 27: if (te->size == mem_chip_info_size((void *)te->blob_address)) { Running mem_chip_info_size() before checking that at least the header fits is unsafe, so this needs to be
if (te->size > sizeof(struct mem_chip_info) && te->size == mem_chip_info_size((void *)te->blob_address)
(this was pointed out in comment https://review.coreboot.org/c/coreboot/+/59195/41/src/soc/qualcomm/common/qc...)
https://review.coreboot.org/c/coreboot/+/63026/comment/b555100f_314331c0 PS3, Line 29: (void *) nit: cast should be unnecessary.
https://review.coreboot.org/c/coreboot/+/63026/comment/bfbad44f_9cadc129 PS3, Line 32: if (!mem_chip_addr) { No, this is supposed...
File src/soc/qualcomm/common/qclib.c:
https://review.coreboot.org/c/coreboot/+/63026/comment/a6bb1957_161b516d PS4, Line 39: { ...to go here.
(If you put the size in an extra variable like Yu-Ping asked, this check needs to come _before_ that.)
https://review.coreboot.org/c/coreboot/+/63026/comment/c77a0a6d_c58ff8b8 PS4, Line 177: /* Attempt to read MEM CHIP information */ I still asked for a better comment on this on the other patch. Maybe
/* Address and size of this entry will be filled in by QcLib. */