Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/30370 )
Change subject: Fix verification with sparse layouts ......................................................................
Patch Set 3:
For the future, I wonder, should we normalize the "UI" layout to something where we can make better assumptions? e.g. sort the regions, merge overlapping/directly following regions and fill gaps with non-included regions
sounds good. Maybe it can even be extended to handle things like read and write protected regions?
Yes, that seems to be the logical next step. Gather all the information first and when we prepare the layout for the actual flash access, check things like that. i.e. regions may overlap generally, but not if one says it's protected and the other says we are going to access it.