This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v2] linux: open and openat ignore 'mode' with O_TMPFILE in flags


On 11/02/2014 05:44 PM, Rich Felker wrote:
On Sun, Nov 02, 2014 at 04:59:35PM +0100, Florian Weimer wrote:
* Eric Rannaud:

This patch above is a straightforward fix, but Linus asks: why not
invoke va_arg() unconditionally? The 'mode' argument thus read could
not be used by the wrapper, as it could contain garbage, but it could
be passed untouched to the kernel.

If technically undefined behavior which just happens to work is
acceptable, you could also add the optional argument to the argument
list.  This would address the performance concern which may have been
the reason to make the va_arg call conditional.

I don't think it's acceptable.

I've asked on gcc-help:

  <http://gcc.gnu.org/ml/gcc-help/2014-12/msg00075.html>

--
Florian Weimer / Red Hat Product Security


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]