This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/17523] open() and openat() ignore 'mode' with O_TMPFILE
- From: "cvs-commit at gcc dot gnu.org" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Tue, 24 Feb 2015 07:50:38 +0000
- Subject: [Bug libc/17523] open() and openat() ignore 'mode' with O_TMPFILE
- Auto-submitted: auto-generated
- References: <bug-17523-131 at http dot sourceware dot org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=17523
--- Comment #8 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".
The branch, master has been updated
via 65f6f938cd562a614a68e15d0581a34b177ec29d (commit)
via 3e3002ffead0526d088c353f97475400367087da (commit)
from 9813dd5835fa81c2e61c188fe08e28c9f3c60c07 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=65f6f938cd562a614a68e15d0581a34b177ec29d
commit 65f6f938cd562a614a68e15d0581a34b177ec29d
Author: Eric Rannaud <e@nanocritical.com>
Date: Tue Feb 24 13:12:26 2015 +0530
linux: open and openat ignore 'mode' with O_TMPFILE in flags
Both open and openat load their last argument 'mode' lazily, using
va_arg() only if O_CREAT is found in oflag. This is wrong, mode is also
necessary if O_TMPFILE is in oflag.
By chance on x86_64, the problem wasn't evident when using O_TMPFILE
with open, as the 3rd argument of open, even when not loaded with
va_arg, is left untouched in RDX, where the syscall expects it.
However, openat was not so lucky, and O_TMPFILE couldn't be used: mode
is the 4th argument, in RCX, but the syscall expects its 4th argument in
a different register than the glibc wrapper, in R10.
Introduce a macro __OPEN_NEEDS_MODE (oflag) to test if either O_CREAT or
O_TMPFILE is set in oflag.
Tested on Linux x86_64.
[BZ #17523]
* io/fcntl.h (__OPEN_NEEDS_MODE): New macro.
* io/bits/fcntl2.h (open): Use it.
(openat): Likewise.
* io/open.c (__libc_open): Likewise.
* io/open64.c (__libc_open64): Likewise.
* io/open64_2.c (__open64_2): Likewise.
* io/open_2.c (__open_2): Likewise.
* io/openat.c (__openat): Likewise.
* io/openat64.c (__openat64): Likewise.
* io/openat64_2.c (__openat64_2): Likewise.
* io/openat_2.c (__openat_2): Likewise.
* sysdeps/mach/hurd/open.c (__libc_open): Likewise.
* sysdeps/mach/hurd/openat.c (__openat): Likewise.
* sysdeps/posix/open64.c (__libc_open64): Likewise.
* sysdeps/unix/sysv/linux/dl-openat64.c (openat64): Likewise.
* sysdeps/unix/sysv/linux/generic/open.c (__libc_open): Likewise.
(__open_nocancel): Likewise.
* sysdeps/unix/sysv/linux/generic/open64.c (__libc_open64): Likewise.
* sysdeps/unix/sysv/linux/open64.c (__libc_open64): Likewise.
* sysdeps/unix/sysv/linux/openat.c (__OPENAT): Likewise.
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=3e3002ffead0526d088c353f97475400367087da
commit 3e3002ffead0526d088c353f97475400367087da
Author: Siddhesh Poyarekar <siddhesh@redhat.com>
Date: Tue Feb 24 12:57:26 2015 +0530
Skip logging for DNSSEC responses [BZ 14841]
DNSSEC defines a number of response types that one me expect when the
DO bit is set. We don't process any of them, but since we do allow
setting the DO bit, skip them without logging an error since it is
only a nuisance.
Tested on x86_64.
[BZ #14841]
* resolv/gethnamaddr.c (getanswer): Skip logging if
RES_USE_DNSSEC is set.
* resolv/nss_dns/dns-host.c (getanswer_r): Likewise.
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 31 ++++++++++++++++++++++++++++++
NEWS | 6 ++--
io/bits/fcntl2.h | 18 ++++++++--------
io/fcntl.h | 14 +++++++++++-
io/open.c | 4 +-
io/open64.c | 4 +-
io/open64_2.c | 4 +-
io/open_2.c | 4 +-
io/openat.c | 4 +-
io/openat64.c | 4 +-
io/openat64_2.c | 4 +-
io/openat_2.c | 4 +-
resolv/gethnamaddr.c | 25 +++++++++--------------
resolv/nss_dns/dns-host.c | 23 +++++++--------------
sysdeps/mach/hurd/open.c | 4 +-
sysdeps/mach/hurd/openat.c | 4 +-
sysdeps/posix/open64.c | 4 +-
sysdeps/unix/sysv/linux/dl-openat64.c | 2 +-
sysdeps/unix/sysv/linux/generic/open.c | 6 ++--
sysdeps/unix/sysv/linux/generic/open64.c | 4 +-
sysdeps/unix/sysv/linux/open64.c | 4 +-
sysdeps/unix/sysv/linux/openat.c | 6 ++--
22 files changed, 106 insertions(+), 77 deletions(-)
--
You are receiving this mail because:
You are on the CC list for the bug.