[PATCH] Update tcache double-free check

Carlos O'Donell carlos@redhat.com
Fri Jul 24 21:05:21 GMT 2020


On 7/24/20 9:37 AM, Eyal Itkin via Libc-alpha wrote:
> Hello,
> 
> As we discussed, I've attached here the patch for updating the
> double-free check in the tcache. The patch passes all of malloc's
> existing tests (including the double free tests), and it was tested to
> work as expected both with and without entropy.
> 
> Once again, I apologize for sending the patch as an attachment instead
> of inlined in the body of the mail itself (same Gmail issues as
> before).
> 
> I am aware that there might be whitespace issues with the patch,
> please feel free to fix them on your end if possible.

Do we have any concerns having all threads call getrandom()?

If even *one* thread succeeded at calling getrandom() could we
use that to make ~tcache more random?

There is certainly a tradeoff here between the number of calls
to getrandom() and the values we use in the key. I haven't
measured the numbers to decide on this yet.

Do your changes show up in benchtests/bench-malloc-{simple,thread}.c?

-- 
Cheers,
Carlos.



More information about the Libc-alpha mailing list