4 ms·
Distros don't build with it, but CONFIG_INIT_ON_FREE_DEFAULT_ON prevents the exploit. I think it's a nice demonstration of the value of the hardening in the ker
by jcalvinowens 3y ago
Distros don't build with it, but CONFIG_INIT_ON_FREE_DEFAULT_ON prevents the exploit. I think it's a nice demonstration of the value of the hardening in the kernel.
- 1oooqooq 3y agothis zeroes memory on every allocation and deallocation. huge perf hit
- jcalvinowens 3y agoZeroing on allocation is almost free. You can invent microbenchmarks where it hurts, but for most workloads it doesn't matter. You can also invent micro cases where it is beneficial, because the cache is hot after the zeroing. The always kernel zeros all userspace allocations, and always has. In a former life, I actually tested this on an x86 webserver workload: the overhead of zeroing on allocation on CPUs that were Ivy Bridge or newer was so small it was literally impossible to measure in high-level web metrics. Sandy Bridge took a 1-2% hit in request throughput as I recall. Zeroing on free is a different story though, that trashes the cache.