This is the mail archive of the glibc-cvs@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]

GNU C Library master sources branch master updated. glibc-2.26.9000-1092-g200fc24


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  200fc24b9dd2360bc850fe71ed22410051426d96 (commit)
      from  8e13c51bb579d56b52e93a058c9efb0bbab35d1b (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 -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=200fc24b9dd2360bc850fe71ed22410051426d96

commit 200fc24b9dd2360bc850fe71ed22410051426d96
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date:   Sun Jan 7 13:31:36 2018 +0100

    hurd: Fix pwritev*
    
    This follows c45d78aac ('posix: Fix generic p{read,write}v buffer allocation
    (BZ#22457)'), which made pwritev to use __mmap instead of __posix_memalign,
    but didn't pass PROT_READ to it, while the pwrite() call does need to
    read the data we have just copied over.
    
    	* sysdeps/posix/pwritev_common.c: Add PROT_READ to __mmap prot.

diff --git a/ChangeLog b/ChangeLog
index 8ddf37e..f0eb187 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -36,6 +36,7 @@
 	(__glob64): Define GLIBC_2_27 versioned symbol instead of glob64.
 	* sysdeps/gnu/glob-lstat-compat.c: New file.
 	* sysdeps/gnu/glob64-lstat-compat.c: New file.
+	* sysdeps/posix/pwritev_common.c: Add PROT_READ to __mmap prot.
 
 2018-01-05  Tulio Magno Quites Machado Filho  <tuliom@linux.vnet.ibm.com>
 
diff --git a/sysdeps/posix/pwritev_common.c b/sysdeps/posix/pwritev_common.c
index bd0f5c5..344ab4d 100644
--- a/sysdeps/posix/pwritev_common.c
+++ b/sysdeps/posix/pwritev_common.c
@@ -55,7 +55,7 @@ PWRITEV (int fd, const struct iovec *vector, int count, OFF_T offset)
      but 1. it is system specific (not meant in generic implementation), and
      2. it would make the implementation more complex, and 3. it will require
      another syscall (fcntl).  */
-  void *buffer = __mmap (NULL, bytes, PROT_WRITE,
+  void *buffer = __mmap (NULL, bytes, PROT_READ | PROT_WRITE,
 		         MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
   if (__glibc_unlikely (buffer == MAP_FAILED))
     return -1;

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                      |    1 +
 sysdeps/posix/pwritev_common.c |    2 +-
 2 files changed, 2 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


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