Module Name: src
Committed By: njoly
Date: Sat May 17 09:23:51 UTC 2014
Modified Files:
src/sys/compat/linux/arch/alpha: syscalls.master
src/sys/compat/linux/arch/amd64: syscalls.master
src/sys/compat/linux/arch/arm: syscalls.master
src/sys/compat/linux/arch/i386: syscalls.master
src/sys/compat/linux/arch/m68k: syscalls.master
src/sys/compat/linux/arch/mips: syscalls.master
src/sys/compat/linux/arch/powerpc: syscalls.master
src/sys/compat/linux/common: linux_fadvise64.c
Log Message:
Fix fadvise64 syscalls to use 64bit offset types.
To generate a diff of this commit:
cvs rdiff -u -r1.86 -r1.87 src/sys/compat/linux/arch/alpha/syscalls.master
cvs rdiff -u -r1.48 -r1.49 src/sys/compat/linux/arch/amd64/syscalls.master
cvs rdiff -u -r1.57 -r1.58 src/sys/compat/linux/arch/arm/syscalls.master
cvs rdiff -u -r1.114 -r1.115 src/sys/compat/linux/arch/i386/syscalls.master
cvs rdiff -u -r1.84 -r1.85 src/sys/compat/linux/arch/m68k/syscalls.master
cvs rdiff -u -r1.52 -r1.53 src/sys/compat/linux/arch/mips/syscalls.master
cvs rdiff -u -r1.61 -r1.62 src/sys/compat/linux/arch/powerpc/syscalls.master
cvs rdiff -u -r1.1 -r1.2 src/sys/compat/linux/common/linux_fadvise64.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/compat/linux/arch/alpha/syscalls.master
diff -u src/sys/compat/linux/arch/alpha/syscalls.master:1.86 src/sys/compat/linux/arch/alpha/syscalls.master:1.87
--- src/sys/compat/linux/arch/alpha/syscalls.master:1.86 Tue May 6 17:33:35 2014
+++ src/sys/compat/linux/arch/alpha/syscalls.master Sat May 17 09:23:51 2014
@@ -1,4 +1,4 @@
- $NetBSD: syscalls.master,v 1.86 2014/05/06 17:33:35 njoly Exp $
+ $NetBSD: syscalls.master,v 1.87 2014/05/17 09:23:51 njoly Exp $
;
; @(#)syscalls.master 8.1 (Berkeley) 7/19/93
@@ -657,8 +657,8 @@
410 UNIMPL remap_file_pages
411 STD { int|linux_sys||set_tid_address(int *tid); }
412 UNIMPL restart_syscall
-413 STD { int|linux_sys||fadvise64(int fd, \
- linux_off_t offset, size_t len, int advice); }
+413 STD { int|linux_sys||fadvise64(int fd, off_t offset, \
+ size_t len, int advice); }
414 UNIMPL timer_create
415 UNIMPL timer_settime
416 UNIMPL timer_gettime
Index: src/sys/compat/linux/arch/amd64/syscalls.master
diff -u src/sys/compat/linux/arch/amd64/syscalls.master:1.48 src/sys/compat/linux/arch/amd64/syscalls.master:1.49
--- src/sys/compat/linux/arch/amd64/syscalls.master:1.48 Sun May 4 10:08:53 2014
+++ src/sys/compat/linux/arch/amd64/syscalls.master Sat May 17 09:23:51 2014
@@ -1,4 +1,4 @@
- $NetBSD: syscalls.master,v 1.48 2014/05/04 10:08:53 njoly Exp $
+ $NetBSD: syscalls.master,v 1.49 2014/05/17 09:23:51 njoly Exp $
; @(#)syscalls.master 8.1 (Berkeley) 7/19/93
@@ -421,8 +421,8 @@
218 STD { int|linux_sys||set_tid_address(int *tid); }
219 UNIMPL restart_syscall
220 UNIMPL semtimedop
-221 STD { int|linux_sys||fadvise64(int fd, \
- linux_off_t offset, size_t len, int advice); }
+221 STD { int|linux_sys||fadvise64(int fd, off_t offset, \
+ size_t len, int advice); }
222 UNIMPL timer_create
223 UNIMPL timer_settime
224 UNIMPL timer_gettime
Index: src/sys/compat/linux/arch/arm/syscalls.master
diff -u src/sys/compat/linux/arch/arm/syscalls.master:1.57 src/sys/compat/linux/arch/arm/syscalls.master:1.58
--- src/sys/compat/linux/arch/arm/syscalls.master:1.57 Tue May 6 17:33:35 2014
+++ src/sys/compat/linux/arch/arm/syscalls.master Sat May 17 09:23:51 2014
@@ -1,4 +1,4 @@
- $NetBSD: syscalls.master,v 1.57 2014/05/06 17:33:35 njoly Exp $
+ $NetBSD: syscalls.master,v 1.58 2014/05/17 09:23:51 njoly Exp $
; Derived from sys/compat/linux/arch/*/syscalls.master
; and from Linux 2.4.12 arch/arm/kernel/calls.S
@@ -451,8 +451,8 @@
size_t sz, struct linux_statfs64 *sp); }
268 STD { int|linux_sys||tgkill(int tgid, int tid, int sig); }
269 STD { int|linux_sys||utimes(const char *path, struct linux_timeval *times); }
-270 STD { int|linux_sys||fadvise64_64(int fd, \
- linux_off_t offset, linux_off_t len, int advice); }
+270 STD { int|linux_sys||fadvise64_64(int fd, off_t offset, \
+ off_t len, int advice); }
271 UNIMPL pciconfig_iobase
272 UNIMPL pciconfig_read
273 UNIMPL pciconfig_write
Index: src/sys/compat/linux/arch/i386/syscalls.master
diff -u src/sys/compat/linux/arch/i386/syscalls.master:1.114 src/sys/compat/linux/arch/i386/syscalls.master:1.115
--- src/sys/compat/linux/arch/i386/syscalls.master:1.114 Sun May 4 10:08:53 2014
+++ src/sys/compat/linux/arch/i386/syscalls.master Sat May 17 09:23:51 2014
@@ -1,4 +1,4 @@
- $NetBSD: syscalls.master,v 1.114 2014/05/04 10:08:53 njoly Exp $
+ $NetBSD: syscalls.master,v 1.115 2014/05/17 09:23:51 njoly Exp $
; @(#)syscalls.master 8.1 (Berkeley) 7/19/93
@@ -423,8 +423,8 @@
247 UNIMPL io_getevents
248 UNIMPL io_submit
249 UNIMPL io_cancel
-250 STD { int|linux_sys||fadvise64(int fd, \
- linux_off_t offset, size_t len, int advice); }
+250 STD { int|linux_sys||fadvise64(int fd, off_t offset, \
+ size_t len, int advice); }
251 UNIMPL /* unused */
252 STD { int|linux_sys||exit_group(int error_code); }
253 UNIMPL lookup_dcookie
@@ -453,8 +453,8 @@
size_t sz, struct linux_statfs64 *sp); }
270 STD { int|linux_sys||tgkill(int tgid, int tid, int sig); }
271 STD { int|linux_sys||utimes(const char *path, struct linux_timeval *times); }
-272 STD { int|linux_sys||fadvise64_64(int fd, \
- linux_off_t offset, linux_off_t len, int advice); }
+272 STD { int|linux_sys||fadvise64_64(int fd, off_t offset, \
+ off_t len, int advice); }
273 UNIMPL vserver
274 UNIMPL mbind
275 UNIMPL get_mempolicy
Index: src/sys/compat/linux/arch/m68k/syscalls.master
diff -u src/sys/compat/linux/arch/m68k/syscalls.master:1.84 src/sys/compat/linux/arch/m68k/syscalls.master:1.85
--- src/sys/compat/linux/arch/m68k/syscalls.master:1.84 Tue May 6 17:33:35 2014
+++ src/sys/compat/linux/arch/m68k/syscalls.master Sat May 17 09:23:51 2014
@@ -1,4 +1,4 @@
- $NetBSD: syscalls.master,v 1.84 2014/05/06 17:33:35 njoly Exp $
+ $NetBSD: syscalls.master,v 1.85 2014/05/17 09:23:51 njoly Exp $
; @(#)syscalls.master 8.1 (Berkeley) 7/19/93
@@ -434,8 +434,8 @@
243 UNIMPL io_getevents
244 UNIMPL io_submit
245 UNIMPL io_cancel
-246 STD { int|linux_sys||fadvise64(int fd, \
- linux_off_t offset, size_t len, int advice); }
+246 STD { int|linux_sys||fadvise64(int fd, off_t offset, \
+ size_t len, int advice); }
247 UNIMPL exit_group
248 UNIMPL lookup_dcookie
249 UNIMPL epoll_create
@@ -463,8 +463,8 @@
size_t sz, struct linux_statfs64 *sp); }
265 STD { int|linux_sys||tgkill(int tgid, int tid, int sig); }
266 STD { int|linux_sys||utimes(const char *path, struct linux_timeval *times); }
-267 STD { int|linux_sys||fadvise64_64(int fd, \
- linux_off_t offset, linux_off_t len, int advice); }
+267 STD { int|linux_sys||fadvise64_64(int fd, off_t offset, \
+ off_t len, int advice); }
268 UNIMPL mbind
269 UNIMPL get_mempolicy
270 UNIMPL set_mempolicy
Index: src/sys/compat/linux/arch/mips/syscalls.master
diff -u src/sys/compat/linux/arch/mips/syscalls.master:1.52 src/sys/compat/linux/arch/mips/syscalls.master:1.53
--- src/sys/compat/linux/arch/mips/syscalls.master:1.52 Tue May 6 17:33:35 2014
+++ src/sys/compat/linux/arch/mips/syscalls.master Sat May 17 09:23:51 2014
@@ -1,4 +1,4 @@
- $NetBSD: syscalls.master,v 1.52 2014/05/06 17:33:35 njoly Exp $
+ $NetBSD: syscalls.master,v 1.53 2014/05/17 09:23:51 njoly Exp $
; @(#)syscalls.master 8.1 (Berkeley) 7/19/93
@@ -432,8 +432,8 @@
251 UNIMPL remap_file_pages
252 STD { int|linux_sys||set_tid_address(int *tid); }
253 UNIMPL restart_syscall
-254 STD { int|linux_sys||fadvise64(int fd, \
- linux_off_t offset, size_t len, int advice); }
+254 STD { int|linux_sys||fadvise64(int fd, off_t offset, \
+ size_t len, int advice); }
255 STD { int|linux_sys||statfs64(const char *path, \
size_t sz, struct linux_statfs64 *sp); }
256 STD { int|linux_sys||fstatfs64(int fd, \
Index: src/sys/compat/linux/arch/powerpc/syscalls.master
diff -u src/sys/compat/linux/arch/powerpc/syscalls.master:1.61 src/sys/compat/linux/arch/powerpc/syscalls.master:1.62
--- src/sys/compat/linux/arch/powerpc/syscalls.master:1.61 Tue May 6 17:33:35 2014
+++ src/sys/compat/linux/arch/powerpc/syscalls.master Sat May 17 09:23:51 2014
@@ -1,4 +1,4 @@
- $NetBSD: syscalls.master,v 1.61 2014/05/06 17:33:35 njoly Exp $
+ $NetBSD: syscalls.master,v 1.62 2014/05/17 09:23:51 njoly Exp $
; @(#)syscalls.master 8.1 (Berkeley) 7/19/93
@@ -420,8 +420,8 @@
230 UNIMPL io_submit
231 UNIMPL io_cancel
232 STD { int|linux_sys||set_tid_address(int *tid); }
-233 STD { int|linux_sys||fadvise64(int fd, \
- linux_off_t offset, size_t len, int advice); }
+233 STD { int|linux_sys||fadvise64(int fd, off_t offset, \
+ size_t len, int advice); }
234 STD { int|linux_sys||exit_group(int error_code); }
235 UNIMPL lookup_dcookie
236 UNIMPL epoll_create
@@ -449,8 +449,8 @@
size_t sz, struct linux_statfs64 *sp); }
253 STD { int|linux_sys||fstatfs64(int fd, \
size_t sz, struct linux_statfs64 *sp); }
-254 STD { int|linux_sys||fadvise64_64(int fd, \
- linux_off_t offset, linux_off_t len, int advice); }
+254 STD { int|linux_sys||fadvise64_64(int fd, off_t offset, \
+ off_t len, int advice); }
255 UNIMPL rtas
256 UNIMPL /* reserved for sys_debug_setcontext */
257 UNIMPL /* reserved for vserver */
Index: src/sys/compat/linux/common/linux_fadvise64.c
diff -u src/sys/compat/linux/common/linux_fadvise64.c:1.1 src/sys/compat/linux/common/linux_fadvise64.c:1.2
--- src/sys/compat/linux/common/linux_fadvise64.c:1.1 Mon May 30 17:50:32 2011
+++ src/sys/compat/linux/common/linux_fadvise64.c Sat May 17 09:23:51 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_fadvise64.c,v 1.1 2011/05/30 17:50:32 alnsn Exp $ */
+/* $NetBSD: linux_fadvise64.c,v 1.2 2014/05/17 09:23:51 njoly Exp $ */
/*-
* Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_fadvise64.c,v 1.1 2011/05/30 17:50:32 alnsn Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_fadvise64.c,v 1.2 2014/05/17 09:23:51 njoly Exp $");
#include <sys/param.h>
#include <sys/types.h>
@@ -67,16 +67,11 @@ linux_sys_fadvise64(struct lwp *l,
{
/* {
syscallarg(int) fd;
- syscallarg(linux_off_t) offset;
+ syscallarg(off_t) offset;
syscallarg(size_t) len;
syscallarg(int) advice;
} */
- size_t len = SCARG(uap, len);
-
- if (sizeof(len) == sizeof(linux_off_t) && len > SSIZE_MAX)
- return (EINVAL);
-
- return do_posix_fadvise(SCARG(uap, fd),
- SCARG(uap, offset), len, linux_to_bsd_posix_fadv(SCARG(uap, advice)));
+ return do_posix_fadvise(SCARG(uap, fd), SCARG(uap, offset),
+ SCARG(uap, len), linux_to_bsd_posix_fadv(SCARG(uap, advice)));
}