[Bug libc/15661] posix_fallocate fallback code buggy and dangerous
fweimer at redhat dot com
sourceware-bugzilla@sourceware.org
Fri Jun 13 15:02:00 GMT 2014
https://sourceware.org/bugzilla/show_bug.cgi?id=15661
Florian Weimer <fweimer at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |fweimer at redhat dot com
Flags| |security-
--- Comment #2 from Florian Weimer <fweimer at redhat dot com> ---
(In reply to Rich Felker from comment #1)
> If keeping the emulation is desirable, I do have one potential fix that
> would avoid the race condition. fork a child process (because this might
> SIGBUS if another thread or process truncates the file), possibly using
> clone to avoid the parent receiving signals from the child's termination. In
> the child, mmap the file and use atomic compare-and-swap on each page that
> should be allocated, with the comparison and new values being equal. This
> will touch each page with a write in a way that's non-destructive.
This needs a way to transparently create child processes, without delivering
SIGCHLD. I don't think we have that at present.
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Glibc-bugs
mailing list