Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/compat Fix pread/pwrite syscalls which need a 64bit offs...



details:   https://anonhg.NetBSD.org/src/rev/4c9f66b71ae5
branches:  trunk
changeset: 329067:4c9f66b71ae5
user:      njoly <njoly%NetBSD.org@localhost>
date:      Sun May 04 10:08:53 2014 +0000

description:
Fix pread/pwrite syscalls which need a 64bit offset argument.

diffstat:

 sys/compat/linux/arch/alpha/syscalls.master   |   6 +++---
 sys/compat/linux/arch/amd64/syscalls.master   |   6 +++---
 sys/compat/linux/arch/arm/syscalls.master     |   6 +++---
 sys/compat/linux/arch/i386/syscalls.master    |   6 +++---
 sys/compat/linux/arch/m68k/syscalls.master    |   6 +++---
 sys/compat/linux/arch/mips/syscalls.master    |   6 +++---
 sys/compat/linux/arch/powerpc/syscalls.master |   6 +++---
 sys/compat/linux/common/linux_file.c          |   8 +++++---
 sys/compat/linux32/arch/amd64/syscalls.master |   6 +++---
 sys/compat/linux32/common/linux32_unistd.c    |  10 ++++++----
 10 files changed, 35 insertions(+), 31 deletions(-)

diffs (261 lines):

diff -r ae709c6c24d9 -r 4c9f66b71ae5 sys/compat/linux/arch/alpha/syscalls.master
--- a/sys/compat/linux/arch/alpha/syscalls.master       Sun May 04 10:03:55 2014 +0000
+++ b/sys/compat/linux/arch/alpha/syscalls.master       Sun May 04 10:08:53 2014 +0000
@@ -1,4 +1,4 @@
-       $NetBSD: syscalls.master,v 1.84 2014/04/08 16:48:01 njoly Exp $
+       $NetBSD: syscalls.master,v 1.85 2014/05/04 10:08:53 njoly Exp $
 ;
 ;      @(#)syscalls.master     8.1 (Berkeley) 7/19/93
 
@@ -554,9 +554,9 @@
 347    UNIMPL          query_module
 348    UNIMPL          prctl
 349    STD             { int|linux_sys||pread(int fd, char *buf, \
-                           size_t nbyte, linux_off_t offset); }
+                           size_t nbyte, off_t offset); }
 350    STD             { int|linux_sys||pwrite(int fd, char *buf, \
-                           size_t nbyte, linux_off_t offset); }
+                           size_t nbyte, off_t offset); }
 351    STD             { int|linux_sys||rt_sigreturn( \
                                struct linux_rt_sigframe *sfp); }
 352    STD             { int|linux_sys||rt_sigaction(int signum, \
diff -r ae709c6c24d9 -r 4c9f66b71ae5 sys/compat/linux/arch/amd64/syscalls.master
--- a/sys/compat/linux/arch/amd64/syscalls.master       Sun May 04 10:03:55 2014 +0000
+++ b/sys/compat/linux/arch/amd64/syscalls.master       Sun May 04 10:08:53 2014 +0000
@@ -1,4 +1,4 @@
-       $NetBSD: syscalls.master,v 1.47 2014/04/08 16:48:01 njoly Exp $
+       $NetBSD: syscalls.master,v 1.48 2014/05/04 10:08:53 njoly Exp $
 
 ;      @(#)syscalls.master     8.1 (Berkeley) 7/19/93
 
@@ -99,9 +99,9 @@
 16     STD             { int|linux_sys||ioctl(int fd, u_long com, \
                            void *data); }
 17     STD             { int|linux_sys||pread(int fd, char *buf, \
-                           size_t nbyte, linux_off_t offset); }
+                           size_t nbyte, off_t offset); }
 18     STD             { int|linux_sys||pwrite(int fd, char *buf, \
-                           size_t nbyte, linux_off_t offset); }
+                           size_t nbyte, off_t offset); }
 19     NOARGS          { ssize_t|sys||readv(int fd, \
                            const struct iovec *iovp, int iovcnt); }
 20     NOARGS          { ssize_t|sys||writev(int fd, \
diff -r ae709c6c24d9 -r 4c9f66b71ae5 sys/compat/linux/arch/arm/syscalls.master
--- a/sys/compat/linux/arch/arm/syscalls.master Sun May 04 10:03:55 2014 +0000
+++ b/sys/compat/linux/arch/arm/syscalls.master Sun May 04 10:08:53 2014 +0000
@@ -1,4 +1,4 @@
-       $NetBSD: syscalls.master,v 1.55 2014/04/08 16:48:01 njoly Exp $
+       $NetBSD: syscalls.master,v 1.56 2014/05/04 10:08:53 njoly Exp $
 
 ; Derived from sys/compat/linux/arch/*/syscalls.master
 ; and from Linux 2.4.12 arch/arm/kernel/calls.S
@@ -316,9 +316,9 @@
 179    STD             { int|linux_sys||rt_sigsuspend(linux_sigset_t *unewset, \
                            size_t sigsetsize); }
 180    STD             { int|linux_sys||pread(int fd, char *buf, \
-                           size_t nbyte, linux_off_t offset); }
+                           size_t nbyte, off_t offset); }
 181    STD             { int|linux_sys||pwrite(int fd, char *buf, \
-                           size_t nbyte, linux_off_t offset); }
+                           size_t nbyte, off_t offset); }
 182    STD             { int|linux_sys||chown16(const char *path, \
                            linux_uid16_t uid, linux_gid16_t gid); }
 183    NOARGS          { int|sys||__getcwd(char *bufp, size_t length); }
diff -r ae709c6c24d9 -r 4c9f66b71ae5 sys/compat/linux/arch/i386/syscalls.master
--- a/sys/compat/linux/arch/i386/syscalls.master        Sun May 04 10:03:55 2014 +0000
+++ b/sys/compat/linux/arch/i386/syscalls.master        Sun May 04 10:08:53 2014 +0000
@@ -1,4 +1,4 @@
-       $NetBSD: syscalls.master,v 1.113 2014/04/08 16:48:01 njoly Exp $
+       $NetBSD: syscalls.master,v 1.114 2014/05/04 10:08:53 njoly Exp $
 
 ;      @(#)syscalls.master     8.1 (Berkeley) 7/19/93
 
@@ -317,9 +317,9 @@
 179    STD             { int|linux_sys||rt_sigsuspend(linux_sigset_t *unewset, \
                            size_t sigsetsize); }
 180    STD             { int|linux_sys||pread(int fd, char *buf, \
-                           size_t nbyte, linux_off_t offset); }
+                           size_t nbyte, off_t offset); }
 181    STD             { int|linux_sys||pwrite(int fd, char *buf, \
-                           size_t nbyte, linux_off_t offset); }
+                           size_t nbyte, off_t offset); }
 182    STD             { int|linux_sys||chown16(const char *path, \
                            linux_uid16_t uid, linux_gid16_t gid); }
 183    NOARGS          { int|sys||__getcwd(char *bufp, size_t length); }
diff -r ae709c6c24d9 -r 4c9f66b71ae5 sys/compat/linux/arch/m68k/syscalls.master
--- a/sys/compat/linux/arch/m68k/syscalls.master        Sun May 04 10:03:55 2014 +0000
+++ b/sys/compat/linux/arch/m68k/syscalls.master        Sun May 04 10:08:53 2014 +0000
@@ -1,4 +1,4 @@
-       $NetBSD: syscalls.master,v 1.82 2014/04/08 16:48:01 njoly Exp $
+       $NetBSD: syscalls.master,v 1.83 2014/05/04 10:08:53 njoly Exp $
 
 ;      @(#)syscalls.master     8.1 (Berkeley) 7/19/93
 
@@ -335,9 +335,9 @@
 179    STD             { int|linux_sys||rt_sigsuspend(linux_sigset_t *unewset, \
                            size_t sigsetsize); }
 180    STD             { int|linux_sys||pread(int fd, char *buf, \
-                           size_t nbyte, linux_off_t offset); }
+                           size_t nbyte, off_t offset); }
 181    STD             { int|linux_sys||pwrite(int fd, char *buf, \
-                           size_t nbyte, linux_off_t offset); }
+                           size_t nbyte, off_t offset); }
 ;182 chown on i386; lchown on m68k.
 182    STD             { int|linux_sys||lchown16(const char *path, \
                            linux_uid16_t uid, linux_gid16_t gid); }
diff -r ae709c6c24d9 -r 4c9f66b71ae5 sys/compat/linux/arch/mips/syscalls.master
--- a/sys/compat/linux/arch/mips/syscalls.master        Sun May 04 10:03:55 2014 +0000
+++ b/sys/compat/linux/arch/mips/syscalls.master        Sun May 04 10:08:53 2014 +0000
@@ -1,4 +1,4 @@
-       $NetBSD: syscalls.master,v 1.50 2014/04/08 16:48:01 njoly Exp $  
+       $NetBSD: syscalls.master,v 1.51 2014/05/04 10:08:53 njoly Exp $  
 
 ;      @(#)syscalls.master     8.1 (Berkeley) 7/19/93
 
@@ -351,9 +351,9 @@
 199    STD             { int|linux_sys||rt_sigsuspend(linux_sigset_t *unewset, \
                            size_t sigsetsize); }
 200    STD             { int|linux_sys||pread(int fd, char *buf, \
-                           size_t nbyte, linux_off_t offset); }
+                           size_t nbyte, off_t offset); }
 201    STD             { int|linux_sys||pwrite(int fd, char *buf, \
-                           size_t nbyte, linux_off_t offset); }
+                           size_t nbyte, off_t offset); }
 202    NOARGS          { int|sys||__posix_chown(const char *path, \
                            int uid, int gid); }
 203    NOARGS          { int|sys||__getcwd(char *bufp, size_t length); }
diff -r ae709c6c24d9 -r 4c9f66b71ae5 sys/compat/linux/arch/powerpc/syscalls.master
--- a/sys/compat/linux/arch/powerpc/syscalls.master     Sun May 04 10:03:55 2014 +0000
+++ b/sys/compat/linux/arch/powerpc/syscalls.master     Sun May 04 10:08:53 2014 +0000
@@ -1,4 +1,4 @@
-       $NetBSD: syscalls.master,v 1.59 2014/04/08 16:48:01 njoly Exp $  
+       $NetBSD: syscalls.master,v 1.60 2014/05/04 10:08:53 njoly Exp $  
 
 ;      @(#)syscalls.master     8.1 (Berkeley) 7/19/93
 
@@ -339,9 +339,9 @@
 178    STD             { int|linux_sys||rt_sigsuspend(linux_sigset_t *unewset, \
                            size_t sigsetsize); }
 179    STD             { int|linux_sys||pread(int fd, char *buf, \
-                           size_t nbyte, linux_off_t offset); }
+                           size_t nbyte, off_t offset); }
 180    STD             { int|linux_sys||pwrite(int fd, char *buf, \
-                           size_t nbyte, linux_off_t offset); }
+                           size_t nbyte, off_t offset); }
 181    NOARGS          { int|sys||__posix_chown(const char *path, \
                            int uid, int gid); }
 182    NOARGS          { int|sys||__getcwd(char *bufp, size_t length); }
diff -r ae709c6c24d9 -r 4c9f66b71ae5 sys/compat/linux/common/linux_file.c
--- a/sys/compat/linux/common/linux_file.c      Sun May 04 10:03:55 2014 +0000
+++ b/sys/compat/linux/common/linux_file.c      Sun May 04 10:08:53 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: linux_file.c,v 1.108 2013/12/08 15:55:10 njoly Exp $   */
+/*     $NetBSD: linux_file.c,v 1.109 2014/05/04 10:08:53 njoly Exp $   */
 
 /*-
  * Copyright (c) 1995, 1998, 2008 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_file.c,v 1.108 2013/12/08 15:55:10 njoly Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_file.c,v 1.109 2014/05/04 10:08:53 njoly Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -739,13 +739,14 @@
                syscallarg(int) fd;
                syscallarg(void *) buf;
                syscallarg(size_t) nbyte;
-               syscallarg(linux_off_t) offset;
+               syscallarg(off_t) offset;
        } */
        struct sys_pread_args pra;
 
        SCARG(&pra, fd) = SCARG(uap, fd);
        SCARG(&pra, buf) = SCARG(uap, buf);
        SCARG(&pra, nbyte) = SCARG(uap, nbyte);
+       SCARG(&pra, PAD) = 0;
        SCARG(&pra, offset) = SCARG(uap, offset);
 
        return sys_pread(l, &pra, retval);
@@ -768,6 +769,7 @@
        SCARG(&pra, fd) = SCARG(uap, fd);
        SCARG(&pra, buf) = SCARG(uap, buf);
        SCARG(&pra, nbyte) = SCARG(uap, nbyte);
+       SCARG(&pra, PAD) = 0;
        SCARG(&pra, offset) = SCARG(uap, offset);
 
        return sys_pwrite(l, &pra, retval);
diff -r ae709c6c24d9 -r 4c9f66b71ae5 sys/compat/linux32/arch/amd64/syscalls.master
--- a/sys/compat/linux32/arch/amd64/syscalls.master     Sun May 04 10:03:55 2014 +0000
+++ b/sys/compat/linux32/arch/amd64/syscalls.master     Sun May 04 10:08:53 2014 +0000
@@ -1,4 +1,4 @@
-       $NetBSD: syscalls.master,v 1.65 2013/11/18 19:23:27 christos Exp $
+       $NetBSD: syscalls.master,v 1.66 2014/05/04 10:08:53 njoly Exp $
 
 ; NetBSD i386 COMPAT_LINUX32 system call name/number "master" file.
 ; (See syscalls.conf to see what it is processed into.)
@@ -328,10 +328,10 @@
                    netbsd32_size_t sigsetsize); }
 180    STD     { netbsd32_ssize_t|linux32_sys||pread(int fd, \
                    netbsd32_voidp buf, netbsd32_size_t nbyte, \
-                   linux32_off_t offset); }
+                   netbsd32_off_t offset); }
 181    STD     { netbsd32_ssize_t|linux32_sys||pwrite(int fd, \
                    netbsd32_voidp buf, netbsd32_size_t nbyte, \
-                   linux32_off_t offset); }
+                   netbsd32_off_t offset); }
 182    STD     { int|linux32_sys||chown16(netbsd32_charp path, \
                    linux32_uid16_t uid, linux32_gid16_t gid); }
 183    NOARGS  { int|netbsd32||__getcwd(netbsd32_charp bufp, \
diff -r ae709c6c24d9 -r 4c9f66b71ae5 sys/compat/linux32/common/linux32_unistd.c
--- a/sys/compat/linux32/common/linux32_unistd.c        Sun May 04 10:03:55 2014 +0000
+++ b/sys/compat/linux32/common/linux32_unistd.c        Sun May 04 10:08:53 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: linux32_unistd.c,v 1.36 2013/11/18 01:35:22 chs Exp $ */
+/*     $NetBSD: linux32_unistd.c,v 1.37 2014/05/04 10:08:53 njoly Exp $ */
 
 /*-
  * Copyright (c) 2006 Emmanuel Dreyfus, all rights reserved.
@@ -33,7 +33,7 @@
 
 #include <sys/cdefs.h>
 
-__KERNEL_RCSID(0, "$NetBSD: linux32_unistd.c,v 1.36 2013/11/18 01:35:22 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux32_unistd.c,v 1.37 2014/05/04 10:08:53 njoly Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -723,13 +723,14 @@
                syscallarg(int) fd;
                syscallarg(netbsd32_voidp) buf;
                syscallarg(netbsd32_size_t) nbyte;
-               syscallarg(linux32_off_t) offset;
+               syscallarg(netbsd32_off_t) offset;
        } */
        struct sys_pread_args pra;
 
        SCARG(&pra, fd) = SCARG(uap, fd);
        SCARG(&pra, buf) = SCARG_P32(uap, buf);
        SCARG(&pra, nbyte) = SCARG(uap, nbyte);
+       SCARG(&pra, PAD) = 0;
        SCARG(&pra, offset) = SCARG(uap, offset);
 
        return sys_pread(l, &pra, retval);
@@ -746,13 +747,14 @@
                syscallarg(int) fd;
                syscallarg(const netbsd32_voidp) buf;
                syscallarg(netbsd32_size_t) nbyte;
-               syscallarg(linux32_off_t) offset;
+               syscallarg(netbsd32_off_t) offset;
        } */
        struct sys_pwrite_args pra;
 
        SCARG(&pra, fd) = SCARG(uap, fd);
        SCARG(&pra, buf) = SCARG_P32(uap, buf);
        SCARG(&pra, nbyte) = SCARG(uap, nbyte);
+       SCARG(&pra, PAD) = 0;
        SCARG(&pra, offset) = SCARG(uap, offset);
 
        return sys_pwrite(l, &pra, retval);



Home | Main Index | Thread Index | Old Index