From: Tom Rini Date: Fri, 12 Apr 2024 22:23:19 +0000 (-0600) Subject: Merge patch series "mcheck implementation for U-Boot" X-Git-Url: http://git.dujemihanovic.xyz/img/static/git-logo.png?a=commitdiff_plain;h=977fc15e9806ce3af2c20228acc3c744f9c3ed0c;p=u-boot.git Merge patch series "mcheck implementation for U-Boot" Eugene Uriev says: There was no "mcheck" for U-Boot before. Since U-Boot has only 1 thread, and normally makes 4000+ - 6000+ mallocs, it's better to use havier canaries to protect heap-chunks. My variant uses 2x8 = 16byte-long protector. And the multiplier could be changed to tune speed/protection tradeoff. This protects not only against memset()-s, but against "near" wild pointers too, and makes more probable to catch "distant" ones. The core file of the set is included into the C-file, not complied separately in order to enable (potential) coexisting of mcheck-protectors, e.g. malloc_simple(.) and dlmalloc simultaneously. My tests were for ARM SoC, 64bit, so the patch is aware of alignment. Primary this patch is for using by developers: to verify, if a change doesn't break the heap integrity. By default the mcheck is disabled and wouldn't affect the boot. I used pedantic mode, canary=16byte, registry-size=6608. For my system the overhead was 230ms. --- 977fc15e9806ce3af2c20228acc3c744f9c3ed0c