Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/compat/linux/common Add/fix statx, readahead, close_rang...
details: https://anonhg.NetBSD.org/src/rev/b1e9b3960bfa
branches: trunk
changeset: 378320:b1e9b3960bfa
user: christos <christos%NetBSD.org@localhost>
date: Sat Jul 29 15:04:28 2023 +0000
description:
Add/fix statx, readahead, close_range. From GSoC 2023 by Theodore Preduta
diffstat:
sys/compat/linux/arch/aarch64/syscalls.master | 8 +-
sys/compat/linux/arch/alpha/syscalls.master | 12 ++-
sys/compat/linux/arch/amd64/syscalls.master | 12 ++-
sys/compat/linux/arch/arm/syscalls.master | 12 ++-
sys/compat/linux/arch/i386/syscalls.master | 12 ++-
sys/compat/linux/arch/m68k/syscalls.master | 12 ++-
sys/compat/linux/arch/mips/syscalls.master | 39 +++++++-----
sys/compat/linux/arch/powerpc/syscalls.master | 12 ++-
sys/compat/linux/common/linux_file64.c | 8 +-
sys/compat/linux/common/linux_misc.c | 84 ++++++++++++++++++++++++++-
10 files changed, 163 insertions(+), 48 deletions(-)
diffs (truncated from 468 to 300 lines):
diff -r 0181f5e65277 -r b1e9b3960bfa sys/compat/linux/arch/aarch64/syscalls.master
--- a/sys/compat/linux/arch/aarch64/syscalls.master Sat Jul 29 14:54:02 2023 +0000
+++ b/sys/compat/linux/arch/aarch64/syscalls.master Sat Jul 29 15:04:28 2023 +0000
@@ -1,4 +1,4 @@
- $NetBSD: syscalls.master,v 1.8 2023/07/29 06:47:26 rin Exp $
+ $NetBSD: syscalls.master,v 1.9 2023/07/29 15:04:28 christos Exp $
; @(#)syscalls.master 8.1 (Berkeley) 7/19/93
@@ -433,7 +433,8 @@ 211 STD { int|linux_sys||sendmsg(int s,
const struct linux_msghdr *msg, int flags); }
212 STD { ssize_t|linux_sys||recvmsg(int s, \
struct linux_msghdr *msg, int flags); }
-213 UNIMPL readahead
+213 STD { ssize_t|linux_sys||readahead(int fd, off_t offset, \
+ size_t count); }
214 STD { int|linux_sys||brk(char *nsize); }
215 NOARGS { int|sys||munmap(void *addr, size_t len); }
216 STD { void *|linux_sys||mremap(void *old_address, \
@@ -675,7 +676,8 @@ 432 UNIMPL fsmount
433 UNIMPL fspick
434 UNIMPL pidfd_open
435 UNIMPL clone3
-436 UNIMPL
+436 STD { int|linux_sys||close_range(unsigned int first, \
+ unsigned int last, unsigned int flags); }
437 UNIMPL openat2
438 UNIMPL pidfd_getfd
439 UNIMPL faccessat2
diff -r 0181f5e65277 -r b1e9b3960bfa sys/compat/linux/arch/alpha/syscalls.master
--- a/sys/compat/linux/arch/alpha/syscalls.master Sat Jul 29 14:54:02 2023 +0000
+++ b/sys/compat/linux/arch/alpha/syscalls.master Sat Jul 29 15:04:28 2023 +0000
@@ -1,4 +1,4 @@
- $NetBSD: syscalls.master,v 1.103 2023/07/28 19:01:11 christos Exp $
+ $NetBSD: syscalls.master,v 1.104 2023/07/29 15:04:28 christos Exp $
;
; @(#)syscalls.master 8.1 (Berkeley) 7/19/93
@@ -614,7 +614,8 @@ 376 UNIMPL pciconfig_iobase
377 STD { int|linux_sys||getdents64(int fd, \
struct linux_dirent64 *dent, unsigned int count); }
378 NOARGS { pid_t|linux_sys||gettid(void); }
-379 UNIMPL readahead
+379 STD { ssize_t|linux_sys||readahead(int fd, off_t offset, \
+ size_t count); }
380 UNIMPL /* unused */
381 STD { int|linux_sys||tkill(int tid, int sig); }
382 STD { int|linux_sys||setxattr(char *path, char *name, \
@@ -830,7 +831,9 @@ 518 UNIMPL
519 UNIMPL
520 UNIMPL
521 UNIMPL
-522 UNIMPL
+522 STD { int|linux_sys||statx(int fd, const char *path, \
+ int flag, unsigned int mask, \
+ struct linux_statx *sp); }
523 UNIMPL
524 UNIMPL
525 UNIMPL
@@ -854,7 +857,8 @@ 542 UNIMPL
543 UNIMPL
544 UNIMPL
545 UNIMPL
-546 UNIMPL
+546 STD { int|linux_sys||close_range(unsigned int first, \
+ unsigned int last, unsigned int flags); }
547 UNIMPL
548 UNIMPL
549 UNIMPL
diff -r 0181f5e65277 -r b1e9b3960bfa sys/compat/linux/arch/amd64/syscalls.master
--- a/sys/compat/linux/arch/amd64/syscalls.master Sat Jul 29 14:54:02 2023 +0000
+++ b/sys/compat/linux/arch/amd64/syscalls.master Sat Jul 29 15:04:28 2023 +0000
@@ -1,4 +1,4 @@
- $NetBSD: syscalls.master,v 1.69 2023/07/28 18:19:00 christos Exp $
+ $NetBSD: syscalls.master,v 1.70 2023/07/29 15:04:28 christos Exp $
; @(#)syscalls.master 8.1 (Berkeley) 7/19/93
@@ -374,7 +374,8 @@ 183 UNIMPL afs_syscall
184 UNIMPL tuxcall
185 UNIMPL security
186 STD { pid_t|linux_sys||gettid(void); }
-187 UNIMPL readahead
+187 STD { ssize_t|linux_sys||readahead(int fd, off_t offset, \
+ size_t count); }
188 STD { int|linux_sys||setxattr(char *path, char *name, \
void *value, size_t size, int flags); }
189 STD { int|linux_sys||lsetxattr(char *path, char *name, \
@@ -593,7 +594,9 @@ 328 UNIMPL pwritev2
329 UNIMPL pkey_mprotect
330 UNIMPL pkey_alloc
331 UNIMPL pkey_free
-332 UNIMPL statx
+332 STD { int|linux_sys||statx(int fd, const char *path, \
+ int flag, unsigned int mask, \
+ struct linux_statx *sp); }
333 UNIMPL io_pgetevents
334 UNIMPL rseq
335 UNIMPL
@@ -697,7 +700,8 @@ 432 UNIMPL fsmount
433 UNIMPL fspick
434 UNIMPL pidfd_open
435 UNIMPL clone3
-436 UNIMPL close_range
+436 STD { int|linux_sys||close_range(unsigned int first, \
+ unsigned int last, unsigned int flags); }
437 UNIMPL openat2
438 UNIMPL pidfd_getfd
439 UNIMPL faccessat2
diff -r 0181f5e65277 -r b1e9b3960bfa sys/compat/linux/arch/arm/syscalls.master
--- a/sys/compat/linux/arch/arm/syscalls.master Sat Jul 29 14:54:02 2023 +0000
+++ b/sys/compat/linux/arch/arm/syscalls.master Sat Jul 29 15:04:28 2023 +0000
@@ -1,4 +1,4 @@
- $NetBSD: syscalls.master,v 1.76 2023/07/28 19:01:11 christos Exp $
+ $NetBSD: syscalls.master,v 1.77 2023/07/29 15:04:28 christos Exp $
; Derived from sys/compat/linux/arch/*/syscalls.master
; and from Linux 2.4.12 arch/arm/kernel/calls.S
@@ -386,7 +386,8 @@ 221 STD { int|linux_sys||fcntl64(int fd
222 UNIMPL /* for tux */
223 UNIMPL /* unused */
224 NOARGS { pid_t|linux_sys||gettid(void); }
-225 UNIMPL readahead
+225 STD { ssize_t|linux_sys||readahead(int fd, off_t offset, \
+ size_t count); }
226 STD { int|linux_sys||setxattr(char *path, char *name, \
void *value, size_t size, int flags); }
227 STD { int|linux_sys||lsetxattr(char *path, char *name, \
@@ -644,7 +645,9 @@ 393 UNIMPL
394 UNIMPL
395 UNIMPL
396 UNIMPL
-397 UNIMPL
+397 STD { int|linux_sys||statx(int fd, const char *path, \
+ int flag, unsigned int mask, \
+ struct linux_statx *sp); }
398 UNIMPL
399 UNIMPL
400 UNIMPL
@@ -683,7 +686,8 @@ 432 UNIMPL
433 UNIMPL
434 UNIMPL
435 UNIMPL
-436 UNIMPL
+436 STD { int|linux_sys||close_range(unsigned int first, \
+ unsigned int last, unsigned int flags); }
437 UNIMPL
438 UNIMPL
439 UNIMPL
diff -r 0181f5e65277 -r b1e9b3960bfa sys/compat/linux/arch/i386/syscalls.master
--- a/sys/compat/linux/arch/i386/syscalls.master Sat Jul 29 14:54:02 2023 +0000
+++ b/sys/compat/linux/arch/i386/syscalls.master Sat Jul 29 15:04:28 2023 +0000
@@ -1,4 +1,4 @@
- $NetBSD: syscalls.master,v 1.131 2023/07/28 19:01:11 christos Exp $
+ $NetBSD: syscalls.master,v 1.132 2023/07/29 15:04:28 christos Exp $
; @(#)syscalls.master 8.1 (Berkeley) 7/19/93
@@ -383,7 +383,8 @@ 221 STD { int|linux_sys||fcntl64(int fd
222 UNIMPL /* unused */
223 UNIMPL /* unused */
224 NOARGS { pid_t|linux_sys||gettid(void); }
-225 UNIMPL readahead
+225 STD { ssize_t|linux_sys||readahead(int fd, off_t offset, \
+ size_t count); }
226 STD { int|linux_sys||setxattr(char *path, char *name, \
void *value, size_t size, int flags); }
227 STD { int|linux_sys||lsetxattr(char *path, char *name, \
@@ -622,7 +623,9 @@ 393 UNIMPL semget
394 UNIMPL semctl
395 UNIMPL shmget
396 UNIMPL shmctl
-397 UNIMPL shmat
+397 STD { int|linux_sys||statx(int fd, const char *path, \
+ int flag, unsigned int mask, \
+ struct linux_statx *sp); }
398 UNIMPL shmdt
399 UNIMPL msgget
400 UNIMPL msgsnd
@@ -661,7 +664,8 @@ 432 UNIMPL fsmount
433 UNIMPL fspick
434 UNIMPL pidfd_open
435 UNIMPL clone3
-436 UNIMPL close_range
+436 STD { int|linux_sys||close_range(unsigned int first, \
+ unsigned int last, unsigned int flags); }
437 UNIMPL openat2
438 UNIMPL pidfd_getfd
439 UNIMPL faccessat2
diff -r 0181f5e65277 -r b1e9b3960bfa sys/compat/linux/arch/m68k/syscalls.master
--- a/sys/compat/linux/arch/m68k/syscalls.master Sat Jul 29 14:54:02 2023 +0000
+++ b/sys/compat/linux/arch/m68k/syscalls.master Sat Jul 29 15:04:28 2023 +0000
@@ -1,4 +1,4 @@
- $NetBSD: syscalls.master,v 1.102 2023/07/28 19:01:11 christos Exp $
+ $NetBSD: syscalls.master,v 1.103 2023/07/29 15:04:29 christos Exp $
; @(#)syscalls.master 8.1 (Berkeley) 7/19/93
@@ -428,7 +428,8 @@ 236 UNIMPL sendfile64
237 NOARGS { int|sys||mincore(void *addr, size_t len, char *vec); }
238 NOARGS { int|sys||madvise(void *addr, size_t len, int behav); }
239 STD { int|linux_sys||fcntl64(int fd, int cmd, void *arg); }
-240 UNIMPL readahead
+240 STD { ssize_t|linux_sys||readahead(int fd, off_t offset, \
+ size_t count); }
241 UNIMPL io_setup
242 UNIMPL io_destroy
243 UNIMPL io_getevents
@@ -631,7 +632,9 @@ 375 UNIMPL mlock2
376 UNIMPL copy_file_range
377 UNIMPL preadv2
378 UNIMPL pwritev2
-379 UNIMPL
+379 STD { int|linux_sys||statx(int fd, const char *path, \
+ int flag, unsigned int mask, \
+ struct linux_statx *sp); }
380 UNIMPL
381 UNIMPL
382 UNIMPL
@@ -688,7 +691,8 @@ 432 UNIMPL
433 UNIMPL
434 UNIMPL
435 UNIMPL
-436 UNIMPL
+436 STD { int|linux_sys||close_range(unsigned int first, \
+ unsigned int last, unsigned int flags); }
437 UNIMPL
438 UNIMPL
439 UNIMPL
diff -r 0181f5e65277 -r b1e9b3960bfa sys/compat/linux/arch/mips/syscalls.master
--- a/sys/compat/linux/arch/mips/syscalls.master Sat Jul 29 14:54:02 2023 +0000
+++ b/sys/compat/linux/arch/mips/syscalls.master Sat Jul 29 15:04:28 2023 +0000
@@ -1,4 +1,4 @@
- $NetBSD: syscalls.master,v 1.75 2023/07/28 19:01:11 christos Exp $
+ $NetBSD: syscalls.master,v 1.76 2023/07/29 15:04:29 christos Exp $
; @(#)syscalls.master 8.1 (Berkeley) 7/19/93
@@ -389,7 +389,8 @@ 220 STD { int|linux_sys||fcntl64(int fd
int cmd, void *arg); }
221 UNIMPL /* reserved */
222 NOARGS { pid_t|linux_sys||gettid(void); }
-223 UNIMPL readahead
+223 STD { ssize_t|linux_sys||readahead(int fd, off_t offset, \
+ size_t count); }
224 STD { int|linux_sys||setxattr(char *path, char *name, \
void *value, size_t size, int flags); }
225 STD { int|linux_sys||lsetxattr(char *path, char *name, \
@@ -592,21 +593,24 @@ 349 UNIMPL finit_module
350 UNIMPL sched_setattr
351 UNIMPL sched_getattr
352 UNIMPL renameat2
-353 UNIMPL seccomp
-354 NOARGS { ssize_t|sys||getrandom(void *buf, size_t buflen, \
+353 NOARGS { ssize_t|sys||getrandom(void *buf, size_t buflen, \
+ unsigned int flags); }
+354 STD { int|linux_sys||memfd_create(const char *name, \
unsigned int flags); }
-355 UNIMPL memfd_create
-356 UNIMPL bpf
-357 UNIMPL execveat
-358 UNIMPL userfaultfd
-359 UNIMPL membarrier
-360 UNIMPL mlock2
-361 UNIMPL copy_file_range
-362 UNIMPL preadv2
-363 UNIMPL pwritev2
-364 UNIMPL pkey_mprotect
-365 UNIMPL pkey_alloc
-366 UNIMPL pkey_free
+355 UNIMPL bpf
+356 UNIMPL execveat
+357 UNIMPL userfaultfd
+358 UNIMPL membarrier
+369 UNIMPL mlock2
+360 UNIMPL copy_file_range
+361 UNIMPL preadv2
+362 UNIMPL pwritev2
+363 UNIMPL pkey_mprotect
+364 UNIMPL pkey_alloc
+365 UNIMPL pkey_free
+366 STD { int|linux_sys||statx(int fd, const char *path, \
+ int flag, unsigned int mask, \
+ struct linux_statx *sp); }
367 UNIMPL
368 UNIMPL
369 UNIMPL
@@ -676,7 +680,8 @@ 432 UNIMPL
433 UNIMPL
434 UNIMPL
435 UNIMPL
-436 UNIMPL
+436 STD { int|linux_sys||close_range(unsigned int first, \
+ unsigned int last, unsigned int flags); }
437 UNIMPL
438 UNIMPL
439 UNIMPL
diff -r 0181f5e65277 -r b1e9b3960bfa sys/compat/linux/arch/powerpc/syscalls.master
--- a/sys/compat/linux/arch/powerpc/syscalls.master Sat Jul 29 14:54:02 2023 +0000
+++ b/sys/compat/linux/arch/powerpc/syscalls.master Sat Jul 29 15:04:28 2023 +0000
Home |
Main Index |
Thread Index |
Old Index