diff options
author | Tom Rini | 2024-04-12 16:23:19 -0600 |
---|---|---|
committer | Tom Rini | 2024-04-12 16:23:19 -0600 |
commit | 977fc15e9806ce3af2c20228acc3c744f9c3ed0c (patch) | |
tree | a6c6f98a21729e6e25078c47737558a1b3518003 /include/dwc3-uboot.h | |
parent | 13c1100335e40acb1066e074eb061387fd103c36 (diff) | |
parent | 707a6dfb2b8429b3d361c8c884ada48ebae6f1e4 (diff) |
Merge patch series "mcheck implementation for U-Boot"
Eugene Uriev <eugeneuriev@gmail.com> 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.
Diffstat (limited to 'include/dwc3-uboot.h')
0 files changed, 0 insertions, 0 deletions