Suggestion: Use -pipe by default
Niels Möller
nisse@lysator.liu.se
Fri Oct 6 15:42:00 GMT 2000
Bourne-again Superuser <toor@dyson.jdyson.com> writes:
> Another argument for -pipe (implied by another contributor to this thread), is
> to minimize the use of the /tmp or /var/tmp for minor security
> improvement...
That was actually what I had in mind when I asked about this. I'm not
going to claim that it is a big security problem (it seems gcc opens
the files with mode 0600 and O_EXCL, which I think should at least
stop symlink-attacks). But if it is reasonable painless to avoid using
/tmp, that's something that should be done. So far it seems that the
arguments for not making -pipe default are:
1. Not all assemblers can read input from a pipe.
2. It is a significant performance hit on machines with small amounts
of memory (I would imagine that the amount of memory needed by as
is typically very small compared to that used by cc1, but I haven't
tried to verify that).
3. There may be a smaller performance hit on larger systems, because
of varios cache and pipe-i/o effects.
4. It changes the optimal argument to make -j. I didn't really
understand why that is a problem.
(By the way, a system call to create an open temp file on disk without
linking it into any directory all is on my OS wishlist, i.e. an
atomic open("foo", O_EXCL...); rm("foo"); ).
Regards,
/Niels
More information about the Gcc-bugs
mailing list