Werner Zeh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/32231 )
Change subject: Add KASAN stubs to coreboot. ......................................................................
Patch Set 1:
(5 comments)
Clean up your lint issues as jenkins won't start a tree-wide generation otherwise.
https://review.coreboot.org/#/c/32231/1//COMMIT_MSG Commit Message:
https://review.coreboot.org/#/c/32231/1//COMMIT_MSG@9 PS1, Line 9: Add option in Kconfig to compile with KASAN. Modify src/lib/Makefile.inc to enable gcc KASAN. Try to keep the 80-char-per-line in the commit message so that it will not look that ugly in gerrit. Here is a good description of how a commit message should look like: https://doc.coreboot.org/lessons/lesson2.html#part-4a-using-the-command-line...
https://review.coreboot.org/#/c/32231/1/src/Kconfig File src/Kconfig:
https://review.coreboot.org/#/c/32231/1/src/Kconfig@224 PS1, Line 224: default y This needs to be default n as you don't want it to be enabled per default. The user can enable it then on demand.
https://review.coreboot.org/#/c/32231/1/src/lib/Makefile.inc File src/lib/Makefile.inc:
https://review.coreboot.org/#/c/32231/1/src/lib/Makefile.inc@92 PS1, Line 92: romstage-$(CONFIG_CACHE_AS_RAM) += ramtest.c Why do you touch it here? It has nothing to do with your KASan change in this patch so do not mix things up in the same commit. Further on, ramtest.c needs to be in romsatge regardless of CACHE_AS_RAM as the aim is to test the DRAM that has been brought up to live in romstage.
https://review.coreboot.org/#/c/32231/1/src/lib/kasan.c File src/lib/kasan.c:
https://review.coreboot.org/#/c/32231/1/src/lib/kasan.c@4 PS1, Line 4: for required by gcc "required by gcc if KASan is enabled"
https://review.coreboot.org/#/c/32231/1/src/lib/kasan.c@5 PS1, Line 5: */ As you explicitly implement the KASan and not ASan feature here, name the stubs __kasan_xxx