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 Fri, Dec 12, 2014 at 2:50 AM, Florian Weimer <fweimer@redhat.com> wrote:
>>>> 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>

I read this thread to mean that their answer is no, there is no GCC
portable way to play fast and loose with the optional argument, and
that we should stick with the current proposed patch?

My FSF papers are finally in. I will resubmit the latest version of
the patch shortly.


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