> Yep, makes sense. I'm currently reworking this whole lib/buildid.c > implementation to remove all the restrictions on data being in the > first page only, and making it work in a faultable context more > reliably. I can audit the code for TOCTOU issues and incorporate your > feedback. I'll probably post the patch set next week, will cc you as > well. Please also add checks that the mapping is executable, to close the obscure "can check the first 4 bytes of every mapped file is ELF\0" hole. But it will still need the hardening because mappings from ld.so are not EBUSY for writes. -Andi