[PATCH] Add Safe-Linking to fastbins and tcache
Wilco Dijkstra
Wilco.Dijkstra@arm.com
Fri Mar 20 00:10:12 GMT 2020
Hi Eyal,
> I went over the patch and fixed it to conform to the coding standards.
> I'm also added it as an attachment, hoping that this way lines won't
> break during the transmission of the email.
Thanks, it now applied fine. There are still a few long lines over 80 chars:
+ if (__glibc_unlikely (!aligned_OK (p)))
+ malloc_printerr ("do_check_malloc_state(): un-aligned fastbin chunk detected");
There is a build issue in that PAGE_SHIFT is not defined. I'm not sure whether
this should come from a Linux header, but it only seems to be set by a few
targets with no generic default defined.
> Regarding the benchmarks, I've just ran them on a simple GCP instance
> (1 vCPU) before and after the patch. As you can see below, the change
> isn't measurable in the "malloc-simple" tests. Sometimes the vanilla
> version is faster (as it should be), but sometimes the patched version
> is faster, which usually means that the change is lower than the noise
> level on the testing server.
Yes, ideally you need an unshared machine with turbo turned off if.
I tried it on a Neoverse N1 and the results look pretty much identical.
The perf profile shows it doesn't affect the hottest paths and only adds a
few extra instructions. So from a performance viewpoint it looks good.
Cheers,
Wilco
More information about the Libc-alpha
mailing list