Harshit Sharma has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/42794 )
Change subject: crossgcc: Allow GCC to get asan shadow offset at runtime ......................................................................
Patch Set 16:
Patch Set 16:
Patch Set 16:
[…]
Do you have a strong objection against this gcc patch? And if yes, for what reason?
If there is an alternative to patching, in my opinion that would be worthwhile, so older coreboot (crosgcc) tool chains and distribution tool chains could be used. Especially, if it’s hard to get the patch merged GCC upstream.
If we skip this patch, we may be able to find a common shadow offset over multiple platforms in case of ramstage. But in other stages like romstage, bootblock where the available memory is limited and varies widely across different platforms, it is not possible to find a common shadow offset.
Having this patch allows us to append the shadow buffer to the region already occupied. This is highly beneficial when using cache as ram as this way we make efficient use of the limited memory available and thus add ASan on a large number of platforms.
Besides, I ran 'make what-jenkins-does' to check the boards on which ASAN_IN_ROMSTAGE can be enabled and only 19 out of 308 boards failed saying CAR area was full. These failed boards had either braswell or i440bx chipsets.