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

Florian Weimer fweimer@redhat.com
Fri Dec 12 10:51:00 GMT 2014


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



More information about the Libc-alpha mailing list