Add/fix statx, readahead, close_range. From GSoC 2023 by Theodore Predutadiff -r1.8 -r1.9 src/sys/compat/linux/arch/aarch64/syscalls.master
(christos)
--- src/sys/compat/linux/arch/aarch64/syscalls.master 2023/07/29 06:47:26 1.8
+++ src/sys/compat/linux/arch/aarch64/syscalls.master 2023/07/29 15:04:28 1.9
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | $NetBSD: syscalls.master,v 1.8 2023/07/29 06:47:26 rin Exp $ | 1 | $NetBSD: syscalls.master,v 1.9 2023/07/29 15:04:28 christos Exp $ | |
2 | 2 | |||
3 | ; @(#)syscalls.master 8.1 (Berkeley) 7/19/93 | 3 | ; @(#)syscalls.master 8.1 (Berkeley) 7/19/93 | |
4 | 4 | |||
5 | ; Derived from sys/compat/linux/arch/*/syscalls.master | 5 | ; Derived from sys/compat/linux/arch/*/syscalls.master | |
6 | ; and from Linux include/uapi/asm-generic/unistd.h | 6 | ; and from Linux include/uapi/asm-generic/unistd.h | |
7 | 7 | |||
8 | ; NetBSD aarch64 COMPAT_LINUX system call name/number "master" file. | 8 | ; NetBSD aarch64 COMPAT_LINUX system call name/number "master" file. | |
9 | ; (See syscalls.conf to see what it is processed into.) | 9 | ; (See syscalls.conf to see what it is processed into.) | |
10 | ; | 10 | ; | |
11 | ; Fields: number type [type-dependent ...] | 11 | ; Fields: number type [type-dependent ...] | |
12 | ; number system call number, must be in order | 12 | ; number system call number, must be in order | |
13 | ; type one of STD, OBSOL, UNIMPL, NODEF, NOARGS, or one of | 13 | ; type one of STD, OBSOL, UNIMPL, NODEF, NOARGS, or one of | |
14 | ; the compatibility options defined in syscalls.conf. | 14 | ; the compatibility options defined in syscalls.conf. | |
@@ -423,27 +423,28 @@ | @@ -423,27 +423,28 @@ | |||
423 | int flags, struct osockaddr *to, int tolen); } | 423 | int flags, struct osockaddr *to, int tolen); } | |
424 | 207 STD { ssize_t|linux_sys||recvfrom(int s, void *buf, \ | 424 | 207 STD { ssize_t|linux_sys||recvfrom(int s, void *buf, \ | |
425 | size_t len, int flags, struct osockaddr *from, \ | 425 | size_t len, int flags, struct osockaddr *from, \ | |
426 | unsigned int *fromlenaddr); } | 426 | unsigned int *fromlenaddr); } | |
427 | 208 STD { int|linux_sys||setsockopt(int s, int level, \ | 427 | 208 STD { int|linux_sys||setsockopt(int s, int level, \ | |
428 | int optname, void *optval, int optlen); } | 428 | int optname, void *optval, int optlen); } | |
429 | 209 STD { int|linux_sys||getsockopt(int s, int level, \ | 429 | 209 STD { int|linux_sys||getsockopt(int s, int level, \ | |
430 | int optname, void *optval, int *optlen); } | 430 | int optname, void *optval, int *optlen); } | |
431 | 210 NOARGS { int|sys||shutdown(int s, int how); } | 431 | 210 NOARGS { int|sys||shutdown(int s, int how); } | |
432 | 211 STD { int|linux_sys||sendmsg(int s, \ | 432 | 211 STD { int|linux_sys||sendmsg(int s, \ | |
433 | const struct linux_msghdr *msg, int flags); } | 433 | const struct linux_msghdr *msg, int flags); } | |
434 | 212 STD { ssize_t|linux_sys||recvmsg(int s, \ | 434 | 212 STD { ssize_t|linux_sys||recvmsg(int s, \ | |
435 | struct linux_msghdr *msg, int flags); } | 435 | struct linux_msghdr *msg, int flags); } | |
436 | 213 UNIMPL readahead | 436 | 213 STD { ssize_t|linux_sys||readahead(int fd, off_t offset, \ | |
437 | size_t count); } | |||
437 | 214 STD { int|linux_sys||brk(char *nsize); } | 438 | 214 STD { int|linux_sys||brk(char *nsize); } | |
438 | 215 NOARGS { int|sys||munmap(void *addr, size_t len); } | 439 | 215 NOARGS { int|sys||munmap(void *addr, size_t len); } | |
439 | 216 STD { void *|linux_sys||mremap(void *old_address, \ | 440 | 216 STD { void *|linux_sys||mremap(void *old_address, \ | |
440 | size_t old_size, size_t new_size, u_long flags); } | 441 | size_t old_size, size_t new_size, u_long flags); } | |
441 | 217 UNIMPL add_key | 442 | 217 UNIMPL add_key | |
442 | 218 UNIMPL request_key | 443 | 218 UNIMPL request_key | |
443 | 219 UNIMPL keyctl | 444 | 219 UNIMPL keyctl | |
444 | 220 STD { int|linux_sys||clone(int flags, void *stack, \ | 445 | 220 STD { int|linux_sys||clone(int flags, void *stack, \ | |
445 | void *parent_tidptr, void *child_tidptr, void *tls); } | 446 | void *parent_tidptr, void *child_tidptr, void *tls); } | |
446 | 221 NOARGS { int|sys||execve(const char *path, char **argp, \ | 447 | 221 NOARGS { int|sys||execve(const char *path, char **argp, \ | |
447 | char **envp); } | 448 | char **envp); } | |
448 | 222 NOARGS { linux_off_t|linux_sys||mmap(unsigned long addr, \ | 449 | 222 NOARGS { linux_off_t|linux_sys||mmap(unsigned long addr, \ | |
449 | size_t len, int prot, int flags, int fd, \ | 450 | size_t len, int prot, int flags, int fd, \ | |
@@ -665,24 +666,25 @@ | @@ -665,24 +666,25 @@ | |||
665 | 423 UNIMPL | 666 | 423 UNIMPL | |
666 | 424 UNIMPL pidfd_send_signal | 667 | 424 UNIMPL pidfd_send_signal | |
667 | 425 UNIMPL io_uring_setup | 668 | 425 UNIMPL io_uring_setup | |
668 | 426 UNIMPL io_uring_enter | 669 | 426 UNIMPL io_uring_enter | |
669 | 427 UNIMPL io_uring_register | 670 | 427 UNIMPL io_uring_register | |
670 | 428 UNIMPL open_tree | 671 | 428 UNIMPL open_tree | |
671 | 429 UNIMPL move_mount | 672 | 429 UNIMPL move_mount | |
672 | 430 UNIMPL fsopen | 673 | 430 UNIMPL fsopen | |
673 | 431 UNIMPL fsconfig | 674 | 431 UNIMPL fsconfig | |
674 | 432 UNIMPL fsmount | 675 | 432 UNIMPL fsmount | |
675 | 433 UNIMPL fspick | 676 | 433 UNIMPL fspick | |
676 | 434 UNIMPL pidfd_open | 677 | 434 UNIMPL pidfd_open | |
677 | 435 UNIMPL clone3 | 678 | 435 UNIMPL clone3 | |
678 | 436 UNIMPL | 679 | 436 STD { int|linux_sys||close_range(unsigned int first, \ | |
680 | unsigned int last, unsigned int flags); } | |||
679 | 437 UNIMPL openat2 | 681 | 437 UNIMPL openat2 | |
680 | 438 UNIMPL pidfd_getfd | 682 | 438 UNIMPL pidfd_getfd | |
681 | 439 UNIMPL faccessat2 | 683 | 439 UNIMPL faccessat2 | |
682 | 684 | |||
683 | ; we want a "nosys" syscall, we'll just add an extra entry for it. | 685 | ; we want a "nosys" syscall, we'll just add an extra entry for it. | |
684 | 440 STD { int|linux_sys||nosys(void); } | 686 | 440 STD { int|linux_sys||nosys(void); } | |
685 | 441 STD { int|linux_sys||epoll_pwait2(int epfd, \ | 687 | 441 STD { int|linux_sys||epoll_pwait2(int epfd, \ | |
686 | struct linux_epoll_event *events, int maxevents, \ | 688 | struct linux_epoll_event *events, int maxevents, \ | |
687 | const struct linux_timespec *timeout, \ | 689 | const struct linux_timespec *timeout, \ | |
688 | const linux_sigset_t *sigmask); } | 690 | const linux_sigset_t *sigmask); } |
--- src/sys/compat/linux/arch/alpha/syscalls.master 2023/07/28 19:01:11 1.103
+++ src/sys/compat/linux/arch/alpha/syscalls.master 2023/07/29 15:04:28 1.104
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | $NetBSD: syscalls.master,v 1.103 2023/07/28 19:01:11 christos Exp $ | 1 | $NetBSD: syscalls.master,v 1.104 2023/07/29 15:04:28 christos Exp $ | |
2 | ; | 2 | ; | |
3 | ; @(#)syscalls.master 8.1 (Berkeley) 7/19/93 | 3 | ; @(#)syscalls.master 8.1 (Berkeley) 7/19/93 | |
4 | 4 | |||
5 | ; NetBSD alpha COMPAT_LINUX system call name/number "master" file. | 5 | ; NetBSD alpha COMPAT_LINUX system call name/number "master" file. | |
6 | ; (See syscalls.conf to see what it is processed into.) | 6 | ; (See syscalls.conf to see what it is processed into.) | |
7 | ; | 7 | ; | |
8 | ; Fields: number type [type-dependent ...] | 8 | ; Fields: number type [type-dependent ...] | |
9 | ; number system call number, must be in order | 9 | ; number system call number, must be in order | |
10 | ; type one of STD, OBSOL, UNIMPL, NODEF, NOARGS, or one of | 10 | ; type one of STD, OBSOL, UNIMPL, NODEF, NOARGS, or one of | |
11 | ; the compatibility options defined in syscalls.conf. | 11 | ; the compatibility options defined in syscalls.conf. | |
12 | ; | 12 | ; | |
13 | ; types: | 13 | ; types: | |
14 | ; STD always included | 14 | ; STD always included | |
@@ -604,27 +604,28 @@ | @@ -604,27 +604,28 @@ | |||
604 | 367 NOARGS { int|sys||__getcwd(char *bufp, size_t length); } | 604 | 367 NOARGS { int|sys||__getcwd(char *bufp, size_t length); } | |
605 | 368 UNIMPL capget | 605 | 368 UNIMPL capget | |
606 | 369 UNIMPL capset | 606 | 369 UNIMPL capset | |
607 | 370 UNIMPL sendfile | 607 | 370 UNIMPL sendfile | |
608 | 371 UNIMPL setresgid | 608 | 371 UNIMPL setresgid | |
609 | 372 UNIMPL getresgid | 609 | 372 UNIMPL getresgid | |
610 | 373 UNIMPL sys_dipc | 610 | 373 UNIMPL sys_dipc | |
611 | 374 UNIMPL pivot_root | 611 | 374 UNIMPL pivot_root | |
612 | 375 NOARGS { int|sys||mincore(void *addr, size_t len, char *vec); } | 612 | 375 NOARGS { int|sys||mincore(void *addr, size_t len, char *vec); } | |
613 | 376 UNIMPL pciconfig_iobase | 613 | 376 UNIMPL pciconfig_iobase | |
614 | 377 STD { int|linux_sys||getdents64(int fd, \ | 614 | 377 STD { int|linux_sys||getdents64(int fd, \ | |
615 | struct linux_dirent64 *dent, unsigned int count); } | 615 | struct linux_dirent64 *dent, unsigned int count); } | |
616 | 378 NOARGS { pid_t|linux_sys||gettid(void); } | 616 | 378 NOARGS { pid_t|linux_sys||gettid(void); } | |
617 | 379 UNIMPL readahead | 617 | 379 STD { ssize_t|linux_sys||readahead(int fd, off_t offset, \ | |
618 | size_t count); } | |||
618 | 380 UNIMPL /* unused */ | 619 | 380 UNIMPL /* unused */ | |
619 | 381 STD { int|linux_sys||tkill(int tid, int sig); } | 620 | 381 STD { int|linux_sys||tkill(int tid, int sig); } | |
620 | 382 STD { int|linux_sys||setxattr(char *path, char *name, \ | 621 | 382 STD { int|linux_sys||setxattr(char *path, char *name, \ | |
621 | void *value, size_t size, int flags); } | 622 | void *value, size_t size, int flags); } | |
622 | 383 STD { int|linux_sys||lsetxattr(char *path, char *name, \ | 623 | 383 STD { int|linux_sys||lsetxattr(char *path, char *name, \ | |
623 | void *value, size_t size, int flags); } | 624 | void *value, size_t size, int flags); } | |
624 | 384 STD { int|linux_sys||fsetxattr(int fd, char *name, \ | 625 | 384 STD { int|linux_sys||fsetxattr(int fd, char *name, \ | |
625 | void *value, size_t size, int flags); } | 626 | void *value, size_t size, int flags); } | |
626 | 385 STD { ssize_t|linux_sys||getxattr(char *path, char *name, \ | 627 | 385 STD { ssize_t|linux_sys||getxattr(char *path, char *name, \ | |
627 | void *value, size_t size); } | 628 | void *value, size_t size); } | |
628 | 386 STD { ssize_t|linux_sys||lgetxattr(char *path, char *name, \ | 629 | 386 STD { ssize_t|linux_sys||lgetxattr(char *path, char *name, \ | |
629 | void *value, size_t size); } | 630 | void *value, size_t size); } | |
630 | 387 STD { ssize_t|linux_sys||fgetxattr(int fd, char *name, \ | 631 | 387 STD { ssize_t|linux_sys||fgetxattr(int fd, char *name, \ | |
@@ -820,46 +821,49 @@ | @@ -820,46 +821,49 @@ | |||
820 | 509 UNIMPL sched_getattr | 821 | 509 UNIMPL sched_getattr | |
821 | 510 UNIMPL renameat2 | 822 | 510 UNIMPL renameat2 | |
822 | 511 UNIMPL | 823 | 511 UNIMPL | |
823 | 512 UNIMPL | 824 | 512 UNIMPL | |
824 | 513 UNIMPL | 825 | 513 UNIMPL | |
825 | 514 UNIMPL | 826 | 514 UNIMPL | |
826 | 515 UNIMPL | 827 | 515 UNIMPL | |
827 | 516 UNIMPL | 828 | 516 UNIMPL | |
828 | 517 UNIMPL | 829 | 517 UNIMPL | |
829 | 518 UNIMPL | 830 | 518 UNIMPL | |
830 | 519 UNIMPL | 831 | 519 UNIMPL | |
831 | 520 UNIMPL | 832 | 520 UNIMPL | |
832 | 521 UNIMPL | 833 | 521 UNIMPL | |
833 | 522 UNIMPL | 834 | 522 STD { int|linux_sys||statx(int fd, const char *path, \ | |
835 | int flag, unsigned int mask, \ | |||
836 | struct linux_statx *sp); } | |||
834 | 523 UNIMPL | 837 | 523 UNIMPL | |
835 | 524 UNIMPL | 838 | 524 UNIMPL | |
836 | 525 UNIMPL | 839 | 525 UNIMPL | |
837 | 526 UNIMPL | 840 | 526 UNIMPL | |
838 | 527 UNIMPL | 841 | 527 UNIMPL | |
839 | 528 UNIMPL | 842 | 528 UNIMPL | |
840 | 529 UNIMPL | 843 | 529 UNIMPL | |
841 | 530 UNIMPL | 844 | 530 UNIMPL | |
842 | 531 UNIMPL | 845 | 531 UNIMPL | |
843 | 532 UNIMPL | 846 | 532 UNIMPL | |
844 | 533 UNIMPL | 847 | 533 UNIMPL | |
845 | 534 UNIMPL | 848 | 534 UNIMPL | |
846 | 535 UNIMPL | 849 | 535 UNIMPL | |
847 | 536 UNIMPL | 850 | 536 UNIMPL | |
848 | 537 UNIMPL | 851 | 537 UNIMPL | |
849 | 538 UNIMPL | 852 | 538 UNIMPL | |
850 | 539 UNIMPL | 853 | 539 UNIMPL | |
851 | 540 UNIMPL | 854 | 540 UNIMPL | |
852 | 541 UNIMPL | 855 | 541 UNIMPL | |
853 | 542 UNIMPL | 856 | 542 UNIMPL | |
854 | 543 UNIMPL | 857 | 543 UNIMPL | |
855 | 544 UNIMPL | 858 | 544 UNIMPL | |
856 | 545 UNIMPL | 859 | 545 UNIMPL | |
857 | 546 UNIMPL | 860 | 546 STD { int|linux_sys||close_range(unsigned int first, \ | |
861 | unsigned int last, unsigned int flags); } | |||
858 | 547 UNIMPL | 862 | 547 UNIMPL | |
859 | 548 UNIMPL | 863 | 548 UNIMPL | |
860 | 549 UNIMPL | 864 | 549 UNIMPL | |
861 | 550 UNIMPL | 865 | 550 UNIMPL | |
862 | 551 STD { int|linux_sys||epoll_pwait2(int epfd, \ | 866 | 551 STD { int|linux_sys||epoll_pwait2(int epfd, \ | |
863 | struct linux_epoll_event *events, int maxevents, \ | 867 | struct linux_epoll_event *events, int maxevents, \ | |
864 | const struct linux_timespec *timeout, \ | 868 | const struct linux_timespec *timeout, \ | |
865 | const linux_sigset_t *sigmask); } | 869 | const linux_sigset_t *sigmask); } |
--- src/sys/compat/linux/arch/amd64/syscalls.master 2023/07/28 18:19:00 1.69
+++ src/sys/compat/linux/arch/amd64/syscalls.master 2023/07/29 15:04:28 1.70
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | $NetBSD: syscalls.master,v 1.69 2023/07/28 18:19:00 christos Exp $ | 1 | $NetBSD: syscalls.master,v 1.70 2023/07/29 15:04:28 christos Exp $ | |
2 | 2 | |||
3 | ; @(#)syscalls.master 8.1 (Berkeley) 7/19/93 | 3 | ; @(#)syscalls.master 8.1 (Berkeley) 7/19/93 | |
4 | 4 | |||
5 | ; NetBSD amd64 COMPAT_LINUX system call name/number "master" file. | 5 | ; NetBSD amd64 COMPAT_LINUX system call name/number "master" file. | |
6 | ; (See syscalls.conf to see what it is processed into.) | 6 | ; (See syscalls.conf to see what it is processed into.) | |
7 | ; | 7 | ; | |
8 | ; Fields: number type [type-dependent ...] | 8 | ; Fields: number type [type-dependent ...] | |
9 | ; number system call number, must be in order | 9 | ; number system call number, must be in order | |
10 | ; type one of STD, OBSOL, UNIMPL, NODEF, NOARGS, or one of | 10 | ; type one of STD, OBSOL, UNIMPL, NODEF, NOARGS, or one of | |
11 | ; the compatibility options defined in syscalls.conf. | 11 | ; the compatibility options defined in syscalls.conf. | |
12 | ; | 12 | ; | |
13 | ; types: | 13 | ; types: | |
14 | ; STD always included | 14 | ; STD always included | |
@@ -364,27 +364,28 @@ | @@ -364,27 +364,28 @@ | |||
364 | 174 UNIMPL create_module | 364 | 174 UNIMPL create_module | |
365 | 175 UNIMPL init_module | 365 | 175 UNIMPL init_module | |
366 | 176 UNIMPL delete_module | 366 | 176 UNIMPL delete_module | |
367 | 177 UNIMPL get_kernel_syms | 367 | 177 UNIMPL get_kernel_syms | |
368 | 178 UNIMPL query_module | 368 | 178 UNIMPL query_module | |
369 | 179 UNIMPL quotactl | 369 | 179 UNIMPL quotactl | |
370 | 180 UNIMPL nfsservctl | 370 | 180 UNIMPL nfsservctl | |
371 | 181 UNIMPL getpmsg | 371 | 181 UNIMPL getpmsg | |
372 | 182 UNIMPL putpmsg | 372 | 182 UNIMPL putpmsg | |
373 | 183 UNIMPL afs_syscall | 373 | 183 UNIMPL afs_syscall | |
374 | 184 UNIMPL tuxcall | 374 | 184 UNIMPL tuxcall | |
375 | 185 UNIMPL security | 375 | 185 UNIMPL security | |
376 | 186 STD { pid_t|linux_sys||gettid(void); } | 376 | 186 STD { pid_t|linux_sys||gettid(void); } | |
377 | 187 UNIMPL readahead | 377 | 187 STD { ssize_t|linux_sys||readahead(int fd, off_t offset, \ | |
378 | size_t count); } | |||
378 | 188 STD { int|linux_sys||setxattr(char *path, char *name, \ | 379 | 188 STD { int|linux_sys||setxattr(char *path, char *name, \ | |
379 | void *value, size_t size, int flags); } | 380 | void *value, size_t size, int flags); } | |
380 | 189 STD { int|linux_sys||lsetxattr(char *path, char *name, \ | 381 | 189 STD { int|linux_sys||lsetxattr(char *path, char *name, \ | |
381 | void *value, size_t size, int flags); } | 382 | void *value, size_t size, int flags); } | |
382 | 190 STD { int|linux_sys||fsetxattr(int fd, char *name, \ | 383 | 190 STD { int|linux_sys||fsetxattr(int fd, char *name, \ | |
383 | void *value, size_t size, int flags); } | 384 | void *value, size_t size, int flags); } | |
384 | 191 STD { ssize_t|linux_sys||getxattr(char *path, char *name, \ | 385 | 191 STD { ssize_t|linux_sys||getxattr(char *path, char *name, \ | |
385 | void *value, size_t size); } | 386 | void *value, size_t size); } | |
386 | 192 STD { ssize_t|linux_sys||lgetxattr(char *path, char *name, \ | 387 | 192 STD { ssize_t|linux_sys||lgetxattr(char *path, char *name, \ | |
387 | void *value, size_t size); } | 388 | void *value, size_t size); } | |
388 | 193 STD { ssize_t|linux_sys||fgetxattr(int fd, char *name, \ | 389 | 193 STD { ssize_t|linux_sys||fgetxattr(int fd, char *name, \ | |
389 | void *value, size_t size); } | 390 | void *value, size_t size); } | |
390 | 194 STD { ssize_t|linux_sys||listxattr(char *path, char *list, \ | 391 | 194 STD { ssize_t|linux_sys||listxattr(char *path, char *list, \ | |
@@ -583,27 +584,29 @@ | @@ -583,27 +584,29 @@ | |||
583 | unsigned int flags); } | 584 | unsigned int flags); } | |
584 | 320 UNIMPL kexec_file_load | 585 | 320 UNIMPL kexec_file_load | |
585 | 321 UNIMPL bpf | 586 | 321 UNIMPL bpf | |
586 | 322 UNIMPL execveat | 587 | 322 UNIMPL execveat | |
587 | 323 UNIMPL userfaultfd | 588 | 323 UNIMPL userfaultfd | |
588 | 324 UNIMPL membarrier | 589 | 324 UNIMPL membarrier | |
589 | 325 UNIMPL mlock2 | 590 | 325 UNIMPL mlock2 | |
590 | 326 UNIMPL copy_file_range | 591 | 326 UNIMPL copy_file_range | |
591 | 327 UNIMPL preadv2 | 592 | 327 UNIMPL preadv2 | |
592 | 328 UNIMPL pwritev2 | 593 | 328 UNIMPL pwritev2 | |
593 | 329 UNIMPL pkey_mprotect | 594 | 329 UNIMPL pkey_mprotect | |
594 | 330 UNIMPL pkey_alloc | 595 | 330 UNIMPL pkey_alloc | |
595 | 331 UNIMPL pkey_free | 596 | 331 UNIMPL pkey_free | |
596 | 332 UNIMPL statx | 597 | 332 STD { int|linux_sys||statx(int fd, const char *path, \ | |
598 | int flag, unsigned int mask, \ | |||
599 | struct linux_statx *sp); } | |||
597 | 333 UNIMPL io_pgetevents | 600 | 333 UNIMPL io_pgetevents | |
598 | 334 UNIMPL rseq | 601 | 334 UNIMPL rseq | |
599 | 335 UNIMPL | 602 | 335 UNIMPL | |
600 | 336 UNIMPL | 603 | 336 UNIMPL | |
601 | 337 UNIMPL | 604 | 337 UNIMPL | |
602 | 338 UNIMPL | 605 | 338 UNIMPL | |
603 | 339 UNIMPL | 606 | 339 UNIMPL | |
604 | 340 UNIMPL | 607 | 340 UNIMPL | |
605 | 341 UNIMPL | 608 | 341 UNIMPL | |
606 | 342 UNIMPL | 609 | 342 UNIMPL | |
607 | 343 UNIMPL | 610 | 343 UNIMPL | |
608 | 344 UNIMPL | 611 | 344 UNIMPL | |
609 | 345 UNIMPL | 612 | 345 UNIMPL | |
@@ -687,27 +690,28 @@ | @@ -687,27 +690,28 @@ | |||
687 | 423 UNIMPL | 690 | 423 UNIMPL | |
688 | 424 UNIMPL pidfd_send_signal | 691 | 424 UNIMPL pidfd_send_signal | |
689 | 425 UNIMPL io_uring_setup | 692 | 425 UNIMPL io_uring_setup | |
690 | 426 UNIMPL io_uring_enter | 693 | 426 UNIMPL io_uring_enter | |
691 | 427 UNIMPL io_uring_register | 694 | 427 UNIMPL io_uring_register | |
692 | 428 UNIMPL open_tree | 695 | 428 UNIMPL open_tree | |
693 | 429 UNIMPL move_mount | 696 | 429 UNIMPL move_mount | |
694 | 430 UNIMPL fsopen | 697 | 430 UNIMPL fsopen | |
695 | 431 UNIMPL fsconfig | 698 | 431 UNIMPL fsconfig | |
696 | 432 UNIMPL fsmount | 699 | 432 UNIMPL fsmount | |
697 | 433 UNIMPL fspick | 700 | 433 UNIMPL fspick | |
698 | 434 UNIMPL pidfd_open | 701 | 434 UNIMPL pidfd_open | |
699 | 435 UNIMPL clone3 | 702 | 435 UNIMPL clone3 | |
700 | 436 UNIMPL close_range | 703 | 436 STD { int|linux_sys||close_range(unsigned int first, \ | |
704 | unsigned int last, unsigned int flags); } | |||
701 | 437 UNIMPL openat2 | 705 | 437 UNIMPL openat2 | |
702 | 438 UNIMPL pidfd_getfd | 706 | 438 UNIMPL pidfd_getfd | |
703 | 439 UNIMPL faccessat2 | 707 | 439 UNIMPL faccessat2 | |
704 | 440 UNIMPL process_madvise | 708 | 440 UNIMPL process_madvise | |
705 | 441 STD { int|linux_sys||epoll_pwait2(int epfd, \ | 709 | 441 STD { int|linux_sys||epoll_pwait2(int epfd, \ | |
706 | struct linux_epoll_event *events, int maxevents, \ | 710 | struct linux_epoll_event *events, int maxevents, \ | |
707 | const struct linux_timespec *timeout, \ | 711 | const struct linux_timespec *timeout, \ | |
708 | const linux_sigset_t *sigmask); } | 712 | const linux_sigset_t *sigmask); } | |
709 | 442 UNIMPL mount_setattr | 713 | 442 UNIMPL mount_setattr | |
710 | 443 UNIMPL quotactl_fd | 714 | 443 UNIMPL quotactl_fd | |
711 | 444 UNIMPL landlock_create_ruleset | 715 | 444 UNIMPL landlock_create_ruleset | |
712 | 445 UNIMPL landlock_add_rule | 716 | 445 UNIMPL landlock_add_rule | |
713 | 446 UNIMPL landlock_restrict_self | 717 | 446 UNIMPL landlock_restrict_self |
--- src/sys/compat/linux/arch/arm/syscalls.master 2023/07/28 19:01:11 1.76
+++ src/sys/compat/linux/arch/arm/syscalls.master 2023/07/29 15:04:28 1.77
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | $NetBSD: syscalls.master,v 1.76 2023/07/28 19:01:11 christos Exp $ | 1 | $NetBSD: syscalls.master,v 1.77 2023/07/29 15:04:28 christos Exp $ | |
2 | 2 | |||
3 | ; Derived from sys/compat/linux/arch/*/syscalls.master | 3 | ; Derived from sys/compat/linux/arch/*/syscalls.master | |
4 | ; and from Linux 2.4.12 arch/arm/kernel/calls.S | 4 | ; and from Linux 2.4.12 arch/arm/kernel/calls.S | |
5 | 5 | |||
6 | ; NetBSD/arm COMPAT_LINUX system call name/number "master" file. | 6 | ; NetBSD/arm COMPAT_LINUX system call name/number "master" file. | |
7 | ; (See syscalls.conf to see what it is processed into.) | 7 | ; (See syscalls.conf to see what it is processed into.) | |
8 | ; | 8 | ; | |
9 | ; Fields: number type [type-dependent ...] | 9 | ; Fields: number type [type-dependent ...] | |
10 | ; number system call number, must be in order | 10 | ; number system call number, must be in order | |
11 | ; type one of STD, OBSOL, UNIMPL, NODEF, NOARGS, or one of | 11 | ; type one of STD, OBSOL, UNIMPL, NODEF, NOARGS, or one of | |
12 | ; the compatibility options defined in syscalls.conf. | 12 | ; the compatibility options defined in syscalls.conf. | |
13 | ; | 13 | ; | |
14 | ; types: | 14 | ; types: | |
@@ -376,27 +376,28 @@ | @@ -376,27 +376,28 @@ | |||
376 | 213 NOARGS setuid32 { int|sys||setuid(uid_t uid); } | 376 | 213 NOARGS setuid32 { int|sys||setuid(uid_t uid); } | |
377 | 214 NOARGS setgid32 { int|sys||setgid(gid_t gid); } | 377 | 214 NOARGS setgid32 { int|sys||setgid(gid_t gid); } | |
378 | 215 NOARGS setfsuid32 { int|linux_sys||setfsuid(uid_t uid); } | 378 | 215 NOARGS setfsuid32 { int|linux_sys||setfsuid(uid_t uid); } | |
379 | 216 NOARGS setfsgid32 { int|linux_sys||setfsgid(gid_t gid); } | 379 | 216 NOARGS setfsgid32 { int|linux_sys||setfsgid(gid_t gid); } | |
380 | 217 STD { int|linux_sys||getdents64(int fd, \ | 380 | 217 STD { int|linux_sys||getdents64(int fd, \ | |
381 | struct linux_dirent64 *dent, unsigned int count); } | 381 | struct linux_dirent64 *dent, unsigned int count); } | |
382 | 218 UNIMPL pivot_root | 382 | 218 UNIMPL pivot_root | |
383 | 219 NOARGS { int|sys||mincore(void *addr, size_t len, char *vec); } | 383 | 219 NOARGS { int|sys||mincore(void *addr, size_t len, char *vec); } | |
384 | 220 NOARGS { int|sys||madvise(void *addr, size_t len, int behav); } | 384 | 220 NOARGS { int|sys||madvise(void *addr, size_t len, int behav); } | |
385 | 221 STD { int|linux_sys||fcntl64(int fd, int cmd, void *arg); } | 385 | 221 STD { int|linux_sys||fcntl64(int fd, int cmd, void *arg); } | |
386 | 222 UNIMPL /* for tux */ | 386 | 222 UNIMPL /* for tux */ | |
387 | 223 UNIMPL /* unused */ | 387 | 223 UNIMPL /* unused */ | |
388 | 224 NOARGS { pid_t|linux_sys||gettid(void); } | 388 | 224 NOARGS { pid_t|linux_sys||gettid(void); } | |
389 | 225 UNIMPL readahead | 389 | 225 STD { ssize_t|linux_sys||readahead(int fd, off_t offset, \ | |
390 | size_t count); } | |||
390 | 226 STD { int|linux_sys||setxattr(char *path, char *name, \ | 391 | 226 STD { int|linux_sys||setxattr(char *path, char *name, \ | |
391 | void *value, size_t size, int flags); } | 392 | void *value, size_t size, int flags); } | |
392 | 227 STD { int|linux_sys||lsetxattr(char *path, char *name, \ | 393 | 227 STD { int|linux_sys||lsetxattr(char *path, char *name, \ | |
393 | void *value, size_t size, int flags); } | 394 | void *value, size_t size, int flags); } | |
394 | 228 STD { int|linux_sys||fsetxattr(int fd, char *name, \ | 395 | 228 STD { int|linux_sys||fsetxattr(int fd, char *name, \ | |
395 | void *value, size_t size, int flags); } | 396 | void *value, size_t size, int flags); } | |
396 | 229 STD { ssize_t|linux_sys||getxattr(char *path, char *name, \ | 397 | 229 STD { ssize_t|linux_sys||getxattr(char *path, char *name, \ | |
397 | void *value, size_t size); } | 398 | void *value, size_t size); } | |
398 | 230 STD { ssize_t|linux_sys||lgetxattr(char *path, char *name, \ | 399 | 230 STD { ssize_t|linux_sys||lgetxattr(char *path, char *name, \ | |
399 | void *value, size_t size); } | 400 | void *value, size_t size); } | |
400 | 231 STD { ssize_t|linux_sys||fgetxattr(int fd, char *name, \ | 401 | 231 STD { ssize_t|linux_sys||fgetxattr(int fd, char *name, \ | |
401 | void *value, size_t size); } | 402 | void *value, size_t size); } | |
402 | 232 STD { ssize_t|linux_sys||listxattr(char *path, char *list, \ | 403 | 232 STD { ssize_t|linux_sys||listxattr(char *path, char *list, \ | |
@@ -634,27 +635,29 @@ | @@ -634,27 +635,29 @@ | |||
634 | 385 STD { int|linux_sys||breakpoint(void); } | 635 | 385 STD { int|linux_sys||breakpoint(void); } | |
635 | 386 STD { int|linux_sys||cacheflush(uintptr_t from, \ | 636 | 386 STD { int|linux_sys||cacheflush(uintptr_t from, \ | |
636 | intptr_t to, int flags); } | 637 | intptr_t to, int flags); } | |
637 | 387 UNIMPL usr26 | 638 | 387 UNIMPL usr26 | |
638 | 388 UNIMPL usr32 | 639 | 388 UNIMPL usr32 | |
639 | 389 STD { int|linux_sys||set_tls(void *tls); } | 640 | 389 STD { int|linux_sys||set_tls(void *tls); } | |
640 | 390 UNIMPL | 641 | 390 UNIMPL | |
641 | 391 UNIMPL | 642 | 391 UNIMPL | |
642 | 392 UNIMPL | 643 | 392 UNIMPL | |
643 | 393 UNIMPL | 644 | 393 UNIMPL | |
644 | 394 UNIMPL | 645 | 394 UNIMPL | |
645 | 395 UNIMPL | 646 | 395 UNIMPL | |
646 | 396 UNIMPL | 647 | 396 UNIMPL | |
647 | 397 UNIMPL | 648 | 397 STD { int|linux_sys||statx(int fd, const char *path, \ | |
649 | int flag, unsigned int mask, \ | |||
650 | struct linux_statx *sp); } | |||
648 | 398 UNIMPL | 651 | 398 UNIMPL | |
649 | 399 UNIMPL | 652 | 399 UNIMPL | |
650 | 400 UNIMPL | 653 | 400 UNIMPL | |
651 | 401 UNIMPL | 654 | 401 UNIMPL | |
652 | 402 UNIMPL | 655 | 402 UNIMPL | |
653 | 403 UNIMPL | 656 | 403 UNIMPL | |
654 | 404 UNIMPL | 657 | 404 UNIMPL | |
655 | 405 UNIMPL | 658 | 405 UNIMPL | |
656 | 406 UNIMPL | 659 | 406 UNIMPL | |
657 | 407 UNIMPL | 660 | 407 UNIMPL | |
658 | 408 UNIMPL | 661 | 408 UNIMPL | |
659 | 409 UNIMPL | 662 | 409 UNIMPL | |
660 | 410 UNIMPL | 663 | 410 UNIMPL | |
@@ -673,22 +676,23 @@ | @@ -673,22 +676,23 @@ | |||
673 | 423 UNIMPL | 676 | 423 UNIMPL | |
674 | 424 UNIMPL | 677 | 424 UNIMPL | |
675 | 425 UNIMPL | 678 | 425 UNIMPL | |
676 | 426 UNIMPL | 679 | 426 UNIMPL | |
677 | 427 UNIMPL | 680 | 427 UNIMPL | |
678 | 428 UNIMPL | 681 | 428 UNIMPL | |
679 | 429 UNIMPL | 682 | 429 UNIMPL | |
680 | 430 UNIMPL | 683 | 430 UNIMPL | |
681 | 431 UNIMPL | 684 | 431 UNIMPL | |
682 | 432 UNIMPL | 685 | 432 UNIMPL | |
683 | 433 UNIMPL | 686 | 433 UNIMPL | |
684 | 434 UNIMPL | 687 | 434 UNIMPL | |
685 | 435 UNIMPL | 688 | 435 UNIMPL | |
686 | 436 UNIMPL | 689 | 436 STD { int|linux_sys||close_range(unsigned int first, \ | |
690 | unsigned int last, unsigned int flags); } | |||
687 | 437 UNIMPL | 691 | 437 UNIMPL | |
688 | 438 UNIMPL | 692 | 438 UNIMPL | |
689 | 439 UNIMPL | 693 | 439 UNIMPL | |
690 | 440 UNIMPL | 694 | 440 UNIMPL | |
691 | 441 STD { int|linux_sys||epoll_pwait2(int epfd, \ | 695 | 441 STD { int|linux_sys||epoll_pwait2(int epfd, \ | |
692 | struct linux_epoll_event *events, int maxevents, \ | 696 | struct linux_epoll_event *events, int maxevents, \ | |
693 | const struct linux_timespec *timeout, \ | 697 | const struct linux_timespec *timeout, \ | |
694 | const linux_sigset_t *sigmask); } | 698 | const linux_sigset_t *sigmask); } |
--- src/sys/compat/linux/arch/i386/syscalls.master 2023/07/28 19:01:11 1.131
+++ src/sys/compat/linux/arch/i386/syscalls.master 2023/07/29 15:04:28 1.132
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | $NetBSD: syscalls.master,v 1.131 2023/07/28 19:01:11 christos Exp $ | 1 | $NetBSD: syscalls.master,v 1.132 2023/07/29 15:04:28 christos Exp $ | |
2 | 2 | |||
3 | ; @(#)syscalls.master 8.1 (Berkeley) 7/19/93 | 3 | ; @(#)syscalls.master 8.1 (Berkeley) 7/19/93 | |
4 | 4 | |||
5 | ; NetBSD i386 COMPAT_LINUX system call name/number "master" file. | 5 | ; NetBSD i386 COMPAT_LINUX system call name/number "master" file. | |
6 | ; (See syscalls.conf to see what it is processed into.) | 6 | ; (See syscalls.conf to see what it is processed into.) | |
7 | ; | 7 | ; | |
8 | ; Fields: number type [type-dependent ...] | 8 | ; Fields: number type [type-dependent ...] | |
9 | ; number system call number, must be in order | 9 | ; number system call number, must be in order | |
10 | ; type one of STD, OBSOL, UNIMPL, NODEF, NOARGS, or one of | 10 | ; type one of STD, OBSOL, UNIMPL, NODEF, NOARGS, or one of | |
11 | ; the compatibility options defined in syscalls.conf. | 11 | ; the compatibility options defined in syscalls.conf. | |
12 | ; | 12 | ; | |
13 | ; types: | 13 | ; types: | |
14 | ; STD always included | 14 | ; STD always included | |
@@ -373,27 +373,28 @@ | @@ -373,27 +373,28 @@ | |||
373 | 213 NOARGS { int|sys||setuid(uid_t uid); } | 373 | 213 NOARGS { int|sys||setuid(uid_t uid); } | |
374 | 214 NOARGS { int|sys||setgid(gid_t gid); } | 374 | 214 NOARGS { int|sys||setgid(gid_t gid); } | |
375 | 215 STD { int|linux_sys||setfsuid(uid_t uid); } | 375 | 215 STD { int|linux_sys||setfsuid(uid_t uid); } | |
376 | 216 STD { int|linux_sys||setfsgid(gid_t gid); } | 376 | 216 STD { int|linux_sys||setfsgid(gid_t gid); } | |
377 | 217 UNIMPL pivot_root | 377 | 217 UNIMPL pivot_root | |
378 | 218 NOARGS { int|sys||mincore(void *addr, size_t len, char *vec); } | 378 | 218 NOARGS { int|sys||mincore(void *addr, size_t len, char *vec); } | |
379 | 219 NOARGS { int|sys||madvise(void *addr, size_t len, int behav); } | 379 | 219 NOARGS { int|sys||madvise(void *addr, size_t len, int behav); } | |
380 | 220 STD { int|linux_sys||getdents64(int fd, \ | 380 | 220 STD { int|linux_sys||getdents64(int fd, \ | |
381 | struct linux_dirent64 *dent, unsigned int count); } | 381 | struct linux_dirent64 *dent, unsigned int count); } | |
382 | 221 STD { int|linux_sys||fcntl64(int fd, int cmd, void *arg); } | 382 | 221 STD { int|linux_sys||fcntl64(int fd, int cmd, void *arg); } | |
383 | 222 UNIMPL /* unused */ | 383 | 222 UNIMPL /* unused */ | |
384 | 223 UNIMPL /* unused */ | 384 | 223 UNIMPL /* unused */ | |
385 | 224 NOARGS { pid_t|linux_sys||gettid(void); } | 385 | 224 NOARGS { pid_t|linux_sys||gettid(void); } | |
386 | 225 UNIMPL readahead | 386 | 225 STD { ssize_t|linux_sys||readahead(int fd, off_t offset, \ | |
387 | size_t count); } | |||
387 | 226 STD { int|linux_sys||setxattr(char *path, char *name, \ | 388 | 226 STD { int|linux_sys||setxattr(char *path, char *name, \ | |
388 | void *value, size_t size, int flags); } | 389 | void *value, size_t size, int flags); } | |
389 | 227 STD { int|linux_sys||lsetxattr(char *path, char *name, \ | 390 | 227 STD { int|linux_sys||lsetxattr(char *path, char *name, \ | |
390 | void *value, size_t size, int flags); } | 391 | void *value, size_t size, int flags); } | |
391 | 228 STD { int|linux_sys||fsetxattr(int fd, char *name, \ | 392 | 228 STD { int|linux_sys||fsetxattr(int fd, char *name, \ | |
392 | void *value, size_t size, int flags); } | 393 | void *value, size_t size, int flags); } | |
393 | 229 STD { ssize_t|linux_sys||getxattr(char *path, char *name, \ | 394 | 229 STD { ssize_t|linux_sys||getxattr(char *path, char *name, \ | |
394 | void *value, size_t size); } | 395 | void *value, size_t size); } | |
395 | 230 STD { ssize_t|linux_sys||lgetxattr(char *path, char *name, \ | 396 | 230 STD { ssize_t|linux_sys||lgetxattr(char *path, char *name, \ | |
396 | void *value, size_t size); } | 397 | void *value, size_t size); } | |
397 | 231 STD { ssize_t|linux_sys||fgetxattr(int fd, char *name, \ | 398 | 231 STD { ssize_t|linux_sys||fgetxattr(int fd, char *name, \ | |
398 | void *value, size_t size); } | 399 | void *value, size_t size); } | |
399 | 232 STD { ssize_t|linux_sys||listxattr(char *path, char *list, \ | 400 | 232 STD { ssize_t|linux_sys||listxattr(char *path, char *list, \ | |
@@ -612,27 +613,29 @@ | @@ -612,27 +613,29 @@ | |||
612 | 384 UNIMPL arch_prctl | 613 | 384 UNIMPL arch_prctl | |
613 | 385 UNIMPL io_pgetevents | 614 | 385 UNIMPL io_pgetevents | |
614 | 386 UNIMPL rseq | 615 | 386 UNIMPL rseq | |
615 | 387 UNIMPL | 616 | 387 UNIMPL | |
616 | 388 UNIMPL | 617 | 388 UNIMPL | |
617 | 389 UNIMPL | 618 | 389 UNIMPL | |
618 | 390 UNIMPL | 619 | 390 UNIMPL | |
619 | 391 UNIMPL | 620 | 391 UNIMPL | |
620 | 392 UNIMPL | 621 | 392 UNIMPL | |
621 | 393 UNIMPL semget | 622 | 393 UNIMPL semget | |
622 | 394 UNIMPL semctl | 623 | 394 UNIMPL semctl | |
623 | 395 UNIMPL shmget | 624 | 395 UNIMPL shmget | |
624 | 396 UNIMPL shmctl | 625 | 396 UNIMPL shmctl | |
625 | 397 UNIMPL shmat | 626 | 397 STD { int|linux_sys||statx(int fd, const char *path, \ | |
627 | int flag, unsigned int mask, \ | |||
628 | struct linux_statx *sp); } | |||
626 | 398 UNIMPL shmdt | 629 | 398 UNIMPL shmdt | |
627 | 399 UNIMPL msgget | 630 | 399 UNIMPL msgget | |
628 | 400 UNIMPL msgsnd | 631 | 400 UNIMPL msgsnd | |
629 | 401 UNIMPL msgrcv | 632 | 401 UNIMPL msgrcv | |
630 | 402 UNIMPL msgctl | 633 | 402 UNIMPL msgctl | |
631 | 403 UNIMPL clock_gettime64 | 634 | 403 UNIMPL clock_gettime64 | |
632 | 404 UNIMPL clock_settime64 | 635 | 404 UNIMPL clock_settime64 | |
633 | 405 UNIMPL clock_adjtime64 | 636 | 405 UNIMPL clock_adjtime64 | |
634 | 406 UNIMPL clock_getres_time64 | 637 | 406 UNIMPL clock_getres_time64 | |
635 | 407 UNIMPL clock_nanosleep_time64 | 638 | 407 UNIMPL clock_nanosleep_time64 | |
636 | 408 UNIMPL timer_gettime64 | 639 | 408 UNIMPL timer_gettime64 | |
637 | 409 UNIMPL timer_settime64 | 640 | 409 UNIMPL timer_settime64 | |
638 | 410 UNIMPL timerfd_gettime64 | 641 | 410 UNIMPL timerfd_gettime64 | |
@@ -651,22 +654,23 @@ | @@ -651,22 +654,23 @@ | |||
651 | 423 UNIMPL sched_rr_get_interval_time64 | 654 | 423 UNIMPL sched_rr_get_interval_time64 | |
652 | 424 UNIMPL pidfd_send_signal | 655 | 424 UNIMPL pidfd_send_signal | |
653 | 425 UNIMPL io_uring_setup | 656 | 425 UNIMPL io_uring_setup | |
654 | 426 UNIMPL io_uring_enter | 657 | 426 UNIMPL io_uring_enter | |
655 | 427 UNIMPL io_uring_register | 658 | 427 UNIMPL io_uring_register | |
656 | 428 UNIMPL open_tree | 659 | 428 UNIMPL open_tree | |
657 | 429 UNIMPL move_mount | 660 | 429 UNIMPL move_mount | |
658 | 430 UNIMPL fsopen | 661 | 430 UNIMPL fsopen | |
659 | 431 UNIMPL fsconfig | 662 | 431 UNIMPL fsconfig | |
660 | 432 UNIMPL fsmount | 663 | 432 UNIMPL fsmount | |
661 | 433 UNIMPL fspick | 664 | 433 UNIMPL fspick | |
662 | 434 UNIMPL pidfd_open | 665 | 434 UNIMPL pidfd_open | |
663 | 435 UNIMPL clone3 | 666 | 435 UNIMPL clone3 | |
664 | 436 UNIMPL close_range | 667 | 436 STD { int|linux_sys||close_range(unsigned int first, \ | |
668 | unsigned int last, unsigned int flags); } | |||
665 | 437 UNIMPL openat2 | 669 | 437 UNIMPL openat2 | |
666 | 438 UNIMPL pidfd_getfd | 670 | 438 UNIMPL pidfd_getfd | |
667 | 439 UNIMPL faccessat2 | 671 | 439 UNIMPL faccessat2 | |
668 | 440 UNIMPL process_madvise | 672 | 440 UNIMPL process_madvise | |
669 | 441 STD { int|linux_sys||epoll_pwait2(int epfd, \ | 673 | 441 STD { int|linux_sys||epoll_pwait2(int epfd, \ | |
670 | struct linux_epoll_event *events, int maxevents, \ | 674 | struct linux_epoll_event *events, int maxevents, \ | |
671 | const struct linux_timespec *timeout, \ | 675 | const struct linux_timespec *timeout, \ | |
672 | const linux_sigset_t *sigmask); } | 676 | const linux_sigset_t *sigmask); } |
--- src/sys/compat/linux/arch/m68k/syscalls.master 2023/07/28 19:01:11 1.102
+++ src/sys/compat/linux/arch/m68k/syscalls.master 2023/07/29 15:04:29 1.103
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | $NetBSD: syscalls.master,v 1.102 2023/07/28 19:01:11 christos Exp $ | 1 | $NetBSD: syscalls.master,v 1.103 2023/07/29 15:04:29 christos Exp $ | |
2 | 2 | |||
3 | ; @(#)syscalls.master 8.1 (Berkeley) 7/19/93 | 3 | ; @(#)syscalls.master 8.1 (Berkeley) 7/19/93 | |
4 | 4 | |||
5 | ; NetBSD m68k COMPAT_LINUX system call name/number "master" file. | 5 | ; NetBSD m68k COMPAT_LINUX system call name/number "master" file. | |
6 | ; (See syscalls.conf to see what it is processed into.) | 6 | ; (See syscalls.conf to see what it is processed into.) | |
7 | ; | 7 | ; | |
8 | ; Fields: number type [type-dependent ...] | 8 | ; Fields: number type [type-dependent ...] | |
9 | ; number system call number, must be in order | 9 | ; number system call number, must be in order | |
10 | ; type one of STD, OBSOL, UNIMPL, NODEF, NOARGS, or one of | 10 | ; type one of STD, OBSOL, UNIMPL, NODEF, NOARGS, or one of | |
11 | ; the compatibility options defined in syscalls.conf. | 11 | ; the compatibility options defined in syscalls.conf. | |
12 | ; | 12 | ; | |
13 | ; types: | 13 | ; types: | |
14 | ; STD always included | 14 | ; STD always included | |
@@ -418,27 +418,28 @@ | @@ -418,27 +418,28 @@ | |||
418 | size_t size); } | 418 | size_t size); } | |
419 | 231 STD { ssize_t|linux_sys||flistxattr(int fd, char *list, \ | 419 | 231 STD { ssize_t|linux_sys||flistxattr(int fd, char *list, \ | |
420 | size_t size); } | 420 | size_t size); } | |
421 | 232 STD { int|linux_sys||removexattr(char *path, char *name); } | 421 | 232 STD { int|linux_sys||removexattr(char *path, char *name); } | |
422 | 233 STD { int|linux_sys||lremovexattr(char *path, char *name); } | 422 | 233 STD { int|linux_sys||lremovexattr(char *path, char *name); } | |
423 | 234 STD { int|linux_sys||fremovexattr(int fd, char *name); } | 423 | 234 STD { int|linux_sys||fremovexattr(int fd, char *name); } | |
424 | 235 STD { int|linux_sys||futex(int *uaddr, int op, int val, \ | 424 | 235 STD { int|linux_sys||futex(int *uaddr, int op, int val, \ | |
425 | const struct linux_timespec *timeout, int *uaddr2, \ | 425 | const struct linux_timespec *timeout, int *uaddr2, \ | |
426 | int val3); } | 426 | int val3); } | |
427 | 236 UNIMPL sendfile64 | 427 | 236 UNIMPL sendfile64 | |
428 | 237 NOARGS { int|sys||mincore(void *addr, size_t len, char *vec); } | 428 | 237 NOARGS { int|sys||mincore(void *addr, size_t len, char *vec); } | |
429 | 238 NOARGS { int|sys||madvise(void *addr, size_t len, int behav); } | 429 | 238 NOARGS { int|sys||madvise(void *addr, size_t len, int behav); } | |
430 | 239 STD { int|linux_sys||fcntl64(int fd, int cmd, void *arg); } | 430 | 239 STD { int|linux_sys||fcntl64(int fd, int cmd, void *arg); } | |
431 | 240 UNIMPL readahead | 431 | 240 STD { ssize_t|linux_sys||readahead(int fd, off_t offset, \ | |
432 | size_t count); } | |||
432 | 241 UNIMPL io_setup | 433 | 241 UNIMPL io_setup | |
433 | 242 UNIMPL io_destroy | 434 | 242 UNIMPL io_destroy | |
434 | 243 UNIMPL io_getevents | 435 | 243 UNIMPL io_getevents | |
435 | 244 UNIMPL io_submit | 436 | 244 UNIMPL io_submit | |
436 | 245 UNIMPL io_cancel | 437 | 245 UNIMPL io_cancel | |
437 | 246 STD { int|linux_sys||fadvise64(int fd, off_t offset, \ | 438 | 246 STD { int|linux_sys||fadvise64(int fd, off_t offset, \ | |
438 | size_t len, int advice); } | 439 | size_t len, int advice); } | |
439 | 247 UNIMPL exit_group | 440 | 247 UNIMPL exit_group | |
440 | 248 UNIMPL lookup_dcookie | 441 | 248 UNIMPL lookup_dcookie | |
441 | 249 STD { int|linux_sys||epoll_create(int size); } | 442 | 249 STD { int|linux_sys||epoll_create(int size); } | |
442 | 250 STD { int|linux_sys||epoll_ctl(int epfd, int op, int fd, \ | 443 | 250 STD { int|linux_sys||epoll_ctl(int epfd, int op, int fd, \ | |
443 | struct linux_epoll_event *event); } | 444 | struct linux_epoll_event *event); } | |
444 | 251 STD { int|linux_sys||epoll_wait(int epfd, \ | 445 | 251 STD { int|linux_sys||epoll_wait(int epfd, \ | |
@@ -621,27 +622,29 @@ | @@ -621,27 +622,29 @@ | |||
621 | 370 UNIMPL shutdown | 622 | 370 UNIMPL shutdown | |
622 | 371 STD { int|linux_sys||recvmmsg(int s, \ | 623 | 371 STD { int|linux_sys||recvmmsg(int s, \ | |
623 | struct linux_mmsghdr *msgvec, unsigned int vlen, \ | 624 | struct linux_mmsghdr *msgvec, unsigned int vlen, \ | |
624 | unsigned int flags, struct timespec *timeout); } | 625 | unsigned int flags, struct timespec *timeout); } | |
625 | 372 STD { int|linux_sys||sendmmsg(int s, \ | 626 | 372 STD { int|linux_sys||sendmmsg(int s, \ | |
626 | struct linux_mmsghdr *msgvec, unsigned int vlen, \ | 627 | struct linux_mmsghdr *msgvec, unsigned int vlen, \ | |
627 | unsigned int flags); } | 628 | unsigned int flags); } | |
628 | 373 UNIMPL userfaultfd | 629 | 373 UNIMPL userfaultfd | |
629 | 374 UNIMPL membarrier | 630 | 374 UNIMPL membarrier | |
630 | 375 UNIMPL mlock2 | 631 | 375 UNIMPL mlock2 | |
631 | 376 UNIMPL copy_file_range | 632 | 376 UNIMPL copy_file_range | |
632 | 377 UNIMPL preadv2 | 633 | 377 UNIMPL preadv2 | |
633 | 378 UNIMPL pwritev2 | 634 | 378 UNIMPL pwritev2 | |
634 | 379 UNIMPL | 635 | 379 STD { int|linux_sys||statx(int fd, const char *path, \ | |
636 | int flag, unsigned int mask, \ | |||
637 | struct linux_statx *sp); } | |||
635 | 380 UNIMPL | 638 | 380 UNIMPL | |
636 | 381 UNIMPL | 639 | 381 UNIMPL | |
637 | 382 UNIMPL | 640 | 382 UNIMPL | |
638 | 383 UNIMPL | 641 | 383 UNIMPL | |
639 | 384 UNIMPL | 642 | 384 UNIMPL | |
640 | 385 UNIMPL | 643 | 385 UNIMPL | |
641 | 386 UNIMPL | 644 | 386 UNIMPL | |
642 | 387 UNIMPL | 645 | 387 UNIMPL | |
643 | 388 UNIMPL | 646 | 388 UNIMPL | |
644 | 389 UNIMPL | 647 | 389 UNIMPL | |
645 | 390 UNIMPL | 648 | 390 UNIMPL | |
646 | 391 UNIMPL | 649 | 391 UNIMPL | |
647 | 392 UNIMPL | 650 | 392 UNIMPL | |
@@ -678,22 +681,23 @@ | @@ -678,22 +681,23 @@ | |||
678 | 423 UNIMPL | 681 | 423 UNIMPL | |
679 | 424 UNIMPL | 682 | 424 UNIMPL | |
680 | 425 UNIMPL | 683 | 425 UNIMPL | |
681 | 426 UNIMPL | 684 | 426 UNIMPL | |
682 | 427 UNIMPL | 685 | 427 UNIMPL | |
683 | 428 UNIMPL | 686 | 428 UNIMPL | |
684 | 429 UNIMPL | 687 | 429 UNIMPL | |
685 | 430 UNIMPL | 688 | 430 UNIMPL | |
686 | 431 UNIMPL | 689 | 431 UNIMPL | |
687 | 432 UNIMPL | 690 | 432 UNIMPL | |
688 | 433 UNIMPL | 691 | 433 UNIMPL | |
689 | 434 UNIMPL | 692 | 434 UNIMPL | |
690 | 435 UNIMPL | 693 | 435 UNIMPL | |
691 | 436 UNIMPL | 694 | 436 STD { int|linux_sys||close_range(unsigned int first, \ | |
695 | unsigned int last, unsigned int flags); } | |||
692 | 437 UNIMPL | 696 | 437 UNIMPL | |
693 | 438 UNIMPL | 697 | 438 UNIMPL | |
694 | 439 UNIMPL | 698 | 439 UNIMPL | |
695 | 440 UNIMPL | 699 | 440 UNIMPL | |
696 | 441 STD { int|linux_sys||epoll_pwait2(int epfd, \ | 700 | 441 STD { int|linux_sys||epoll_pwait2(int epfd, \ | |
697 | struct linux_epoll_event *events, int maxevents, \ | 701 | struct linux_epoll_event *events, int maxevents, \ | |
698 | const struct linux_timespec *timeout, \ | 702 | const struct linux_timespec *timeout, \ | |
699 | const linux_sigset_t *sigmask); } | 703 | const linux_sigset_t *sigmask); } |
--- src/sys/compat/linux/arch/mips/syscalls.master 2023/07/28 19:01:11 1.75
+++ src/sys/compat/linux/arch/mips/syscalls.master 2023/07/29 15:04:29 1.76
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | $NetBSD: syscalls.master,v 1.75 2023/07/28 19:01:11 christos Exp $ | 1 | $NetBSD: syscalls.master,v 1.76 2023/07/29 15:04:29 christos Exp $ | |
2 | 2 | |||
3 | ; @(#)syscalls.master 8.1 (Berkeley) 7/19/93 | 3 | ; @(#)syscalls.master 8.1 (Berkeley) 7/19/93 | |
4 | 4 | |||
5 | ; Derived from NetBSD's sys/compat/linux/arch/powerpc/syscalls.master | 5 | ; Derived from NetBSD's sys/compat/linux/arch/powerpc/syscalls.master | |
6 | ; from Linux's arch/mips/kernel/syscalls.h | 6 | ; from Linux's arch/mips/kernel/syscalls.h | |
7 | 7 | |||
8 | ; NetBSD mips COMPAT_LINUX system call name/number "master" file. | 8 | ; NetBSD mips COMPAT_LINUX system call name/number "master" file. | |
9 | ; (See syscalls.conf to see what it is processed into.) | 9 | ; (See syscalls.conf to see what it is processed into.) | |
10 | ; | 10 | ; | |
11 | ; Expect problems with | 11 | ; Expect problems with | |
12 | ; 48 signal: undefined in Linux??? | 12 | ; 48 signal: undefined in Linux??? | |
13 | ; 86 uselib: needs a.out | 13 | ; 86 uselib: needs a.out | |
14 | ; | 14 | ; | |
@@ -379,27 +379,28 @@ | @@ -379,27 +379,28 @@ | |||
379 | 214 STD { int|linux_sys||lstat64(const char *path, \ | 379 | 214 STD { int|linux_sys||lstat64(const char *path, \ | |
380 | struct linux_stat64 *sp); } | 380 | struct linux_stat64 *sp); } | |
381 | 215 STD { int|linux_sys||fstat64(int fd, \ | 381 | 215 STD { int|linux_sys||fstat64(int fd, \ | |
382 | struct linux_stat64 *sp); } | 382 | struct linux_stat64 *sp); } | |
383 | 216 UNIMPL pivot_root | 383 | 216 UNIMPL pivot_root | |
384 | 217 NOARGS { int|sys||mincore(void *addr, size_t len, char *vec); } | 384 | 217 NOARGS { int|sys||mincore(void *addr, size_t len, char *vec); } | |
385 | 218 NOARGS { int|sys||madvise(void *addr, size_t len, int behav); } | 385 | 218 NOARGS { int|sys||madvise(void *addr, size_t len, int behav); } | |
386 | 219 STD { int|linux_sys||getdents64(int fd, \ | 386 | 219 STD { int|linux_sys||getdents64(int fd, \ | |
387 | struct linux_dirent64 *dent, unsigned int count); } | 387 | struct linux_dirent64 *dent, unsigned int count); } | |
388 | 220 STD { int|linux_sys||fcntl64(int fd, \ | 388 | 220 STD { int|linux_sys||fcntl64(int fd, \ | |
389 | int cmd, void *arg); } | 389 | int cmd, void *arg); } | |
390 | 221 UNIMPL /* reserved */ | 390 | 221 UNIMPL /* reserved */ | |
391 | 222 NOARGS { pid_t|linux_sys||gettid(void); } | 391 | 222 NOARGS { pid_t|linux_sys||gettid(void); } | |
392 | 223 UNIMPL readahead | 392 | 223 STD { ssize_t|linux_sys||readahead(int fd, off_t offset, \ | |
393 | size_t count); } | |||
393 | 224 STD { int|linux_sys||setxattr(char *path, char *name, \ | 394 | 224 STD { int|linux_sys||setxattr(char *path, char *name, \ | |
394 | void *value, size_t size, int flags); } | 395 | void *value, size_t size, int flags); } | |
395 | 225 STD { int|linux_sys||lsetxattr(char *path, char *name, \ | 396 | 225 STD { int|linux_sys||lsetxattr(char *path, char *name, \ | |
396 | void *value, size_t size, int flags); } | 397 | void *value, size_t size, int flags); } | |
397 | 226 STD { int|linux_sys||fsetxattr(int fd, char *name, \ | 398 | 226 STD { int|linux_sys||fsetxattr(int fd, char *name, \ | |
398 | void *value, size_t size, int flags); } | 399 | void *value, size_t size, int flags); } | |
399 | 227 STD { ssize_t|linux_sys||getxattr(char *path, char *name, \ | 400 | 227 STD { ssize_t|linux_sys||getxattr(char *path, char *name, \ | |
400 | void *value, size_t size); } | 401 | void *value, size_t size); } | |
401 | 228 STD { ssize_t|linux_sys||lgetxattr(char *path, char *name, \ | 402 | 228 STD { ssize_t|linux_sys||lgetxattr(char *path, char *name, \ | |
402 | void *value, size_t size); } | 403 | void *value, size_t size); } | |
403 | 229 STD { ssize_t|linux_sys||fgetxattr(int fd, char *name, \ | 404 | 229 STD { ssize_t|linux_sys||fgetxattr(int fd, char *name, \ | |
404 | void *value, size_t size); } | 405 | void *value, size_t size); } | |
405 | 230 STD { ssize_t|linux_sys||listxattr(char *path, char *list, \ | 406 | 230 STD { ssize_t|linux_sys||listxattr(char *path, char *list, \ | |
@@ -582,41 +583,44 @@ | @@ -582,41 +583,44 @@ | |||
582 | 342 UNIMPL clock_adjtime | 583 | 342 UNIMPL clock_adjtime | |
583 | 343 UNIMPL syncfs | 584 | 343 UNIMPL syncfs | |
584 | 344 STD { int|linux_sys||sendmmsg(int s, \ | 585 | 344 STD { int|linux_sys||sendmmsg(int s, \ | |
585 | struct linux_mmsghdr *msgvec, unsigned int vlen, \ | 586 | struct linux_mmsghdr *msgvec, unsigned int vlen, \ | |
586 | unsigned int flags); } | 587 | unsigned int flags); } | |
587 | 345 UNIMPL setns | 588 | 345 UNIMPL setns | |
588 | 346 UNIMPL process_vm_readv | 589 | 346 UNIMPL process_vm_readv | |
589 | 347 UNIMPL process_vm_writev | 590 | 347 UNIMPL process_vm_writev | |
590 | 348 UNIMPL kcmp | 591 | 348 UNIMPL kcmp | |
591 | 349 UNIMPL finit_module | 592 | 349 UNIMPL finit_module | |
592 | 350 UNIMPL sched_setattr | 593 | 350 UNIMPL sched_setattr | |
593 | 351 UNIMPL sched_getattr | 594 | 351 UNIMPL sched_getattr | |
594 | 352 UNIMPL renameat2 | 595 | 352 UNIMPL renameat2 | |
595 | 353 UNIMPL seccomp | 596 | 353 NOARGS { ssize_t|sys||getrandom(void *buf, size_t buflen, \ | |
596 | 354 NOARGS { ssize_t|sys||getrandom(void *buf, size_t buflen, \ | |||
597 | unsigned int flags); } | 597 | unsigned int flags); } | |
598 | 355 UNIMPL memfd_create | 598 | 354 STD { int|linux_sys||memfd_create(const char *name, \ | |
599 | 356 UNIMPL bpf | 599 | unsigned int flags); } | |
600 | 357 UNIMPL execveat | 600 | 355 UNIMPL bpf | |
601 | 358 UNIMPL userfaultfd | 601 | 356 UNIMPL execveat | |
602 | 359 UNIMPL membarrier | 602 | 357 UNIMPL userfaultfd | |
603 | 360 UNIMPL mlock2 | 603 | 358 UNIMPL membarrier | |
604 | 361 UNIMPL copy_file_range | 604 | 369 UNIMPL mlock2 | |
605 | 362 UNIMPL preadv2 | 605 | 360 UNIMPL copy_file_range | |
606 | 363 UNIMPL pwritev2 | 606 | 361 UNIMPL preadv2 | |
607 | 364 UNIMPL pkey_mprotect | 607 | 362 UNIMPL pwritev2 | |
608 | 365 UNIMPL pkey_alloc | 608 | 363 UNIMPL pkey_mprotect | |
609 | 366 UNIMPL pkey_free | 609 | 364 UNIMPL pkey_alloc | |
610 | 365 UNIMPL pkey_free | |||
611 | 366 STD { int|linux_sys||statx(int fd, const char *path, \ | |||
612 | int flag, unsigned int mask, \ | |||
613 | struct linux_statx *sp); } | |||
610 | 367 UNIMPL | 614 | 367 UNIMPL | |
611 | 368 UNIMPL | 615 | 368 UNIMPL | |
612 | 369 UNIMPL | 616 | 369 UNIMPL | |
613 | 370 UNIMPL | 617 | 370 UNIMPL | |
614 | 371 UNIMPL | 618 | 371 UNIMPL | |
615 | 372 UNIMPL | 619 | 372 UNIMPL | |
616 | 373 UNIMPL | 620 | 373 UNIMPL | |
617 | 374 UNIMPL | 621 | 374 UNIMPL | |
618 | 375 UNIMPL | 622 | 375 UNIMPL | |
619 | 376 UNIMPL | 623 | 376 UNIMPL | |
620 | 377 UNIMPL | 624 | 377 UNIMPL | |
621 | 378 UNIMPL | 625 | 378 UNIMPL | |
622 | 379 UNIMPL | 626 | 379 UNIMPL | |
@@ -666,22 +670,23 @@ | @@ -666,22 +670,23 @@ | |||
666 | 423 UNIMPL | 670 | 423 UNIMPL | |
667 | 424 UNIMPL | 671 | 424 UNIMPL | |
668 | 425 UNIMPL | 672 | 425 UNIMPL | |
669 | 426 UNIMPL | 673 | 426 UNIMPL | |
670 | 427 UNIMPL | 674 | 427 UNIMPL | |
671 | 428 UNIMPL | 675 | 428 UNIMPL | |
672 | 429 UNIMPL | 676 | 429 UNIMPL | |
673 | 430 UNIMPL | 677 | 430 UNIMPL | |
674 | 431 UNIMPL | 678 | 431 UNIMPL | |
675 | 432 UNIMPL | 679 | 432 UNIMPL | |
676 | 433 UNIMPL | 680 | 433 UNIMPL | |
677 | 434 UNIMPL | 681 | 434 UNIMPL | |
678 | 435 UNIMPL | 682 | 435 UNIMPL | |
679 | 436 UNIMPL | 683 | 436 STD { int|linux_sys||close_range(unsigned int first, \ | |
684 | unsigned int last, unsigned int flags); } | |||
680 | 437 UNIMPL | 685 | 437 UNIMPL | |
681 | 438 UNIMPL | 686 | 438 UNIMPL | |
682 | 439 UNIMPL | 687 | 439 UNIMPL | |
683 | 440 UNIMPL | 688 | 440 UNIMPL | |
684 | 441 STD { int|linux_sys||epoll_pwait2(int epfd, \ | 689 | 441 STD { int|linux_sys||epoll_pwait2(int epfd, \ | |
685 | struct linux_epoll_event *events, int maxevents, \ | 690 | struct linux_epoll_event *events, int maxevents, \ | |
686 | const struct linux_timespec *timeout, \ | 691 | const struct linux_timespec *timeout, \ | |
687 | const linux_sigset_t *sigmask); } | 692 | const linux_sigset_t *sigmask); } |
--- src/sys/compat/linux/arch/powerpc/syscalls.master 2023/07/28 19:01:11 1.81
+++ src/sys/compat/linux/arch/powerpc/syscalls.master 2023/07/29 15:04:29 1.82
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | $NetBSD: syscalls.master,v 1.81 2023/07/28 19:01:11 christos Exp $ | 1 | $NetBSD: syscalls.master,v 1.82 2023/07/29 15:04:29 christos Exp $ | |
2 | 2 | |||
3 | ; @(#)syscalls.master 8.1 (Berkeley) 7/19/93 | 3 | ; @(#)syscalls.master 8.1 (Berkeley) 7/19/93 | |
4 | 4 | |||
5 | ; Derived from NetBSD's sys/compat/linux/arch/i386/syscalls.master | 5 | ; Derived from NetBSD's sys/compat/linux/arch/i386/syscalls.master | |
6 | ; sys/compat/linux/arch/m68k/syscalls.master | 6 | ; sys/compat/linux/arch/m68k/syscalls.master | |
7 | ; and from Linux's arch/ppc/kernel/misc.S | 7 | ; and from Linux's arch/ppc/kernel/misc.S | |
8 | ; | 8 | ; | |
9 | ; We have problems for a few syscalls, specially: | 9 | ; We have problems for a few syscalls, specially: | |
10 | ; 142 ppc_select -> sys_new_select -> sys_select (Conflicts with 82 ???). | 10 | ; 142 ppc_select -> sys_new_select -> sys_select (Conflicts with 82 ???). | |
11 | ; | 11 | ; | |
12 | ; Expect problems with the following, which have an architecture dependent | 12 | ; Expect problems with the following, which have an architecture dependent | |
13 | ; implementation in Linux/powerpc: | 13 | ; implementation in Linux/powerpc: | |
14 | ; 29 pause | 14 | ; 29 pause | |
@@ -347,27 +347,28 @@ | @@ -347,27 +347,28 @@ | |||
347 | gid_t gid); } | 347 | gid_t gid); } | |
348 | 182 NOARGS { int|sys||__getcwd(char *bufp, size_t length); } | 348 | 182 NOARGS { int|sys||__getcwd(char *bufp, size_t length); } | |
349 | 183 UNIMPL capget | 349 | 183 UNIMPL capget | |
350 | 184 UNIMPL capset | 350 | 184 UNIMPL capset | |
351 | 185 STD { int|linux_sys||sigaltstack( \ | 351 | 185 STD { int|linux_sys||sigaltstack( \ | |
352 | const struct linux_sigaltstack *ss, \ | 352 | const struct linux_sigaltstack *ss, \ | |
353 | struct linux_sigaltstack *oss); } | 353 | struct linux_sigaltstack *oss); } | |
354 | 186 UNIMPL sendfile | 354 | 186 UNIMPL sendfile | |
355 | 187 UNIMPL getpmsg | 355 | 187 UNIMPL getpmsg | |
356 | 188 UNIMPL putpmsg | 356 | 188 UNIMPL putpmsg | |
357 | 189 NOARGS { int|sys|14|vfork(void); } | 357 | 189 NOARGS { int|sys|14|vfork(void); } | |
358 | 190 STD { int|linux_sys||ugetrlimit(int which, \ | 358 | 190 STD { int|linux_sys||ugetrlimit(int which, \ | |
359 | struct rlimit *rlp); } | 359 | struct rlimit *rlp); } | |
360 | 191 UNIMPL /* unused */ | 360 | 191 STD { ssize_t|linux_sys||readahead(int fd, off_t offset, \ | |
361 | size_t count); } | |||
361 | #define linux_sys_mmap2_args linux_sys_mmap_args | 362 | #define linux_sys_mmap2_args linux_sys_mmap_args | |
362 | 192 NOARGS { linux_off_t|linux_sys||mmap2(unsigned long addr, \ | 363 | 192 NOARGS { linux_off_t|linux_sys||mmap2(unsigned long addr, \ | |
363 | size_t len, int prot, int flags, int fd, \ | 364 | size_t len, int prot, int flags, int fd, \ | |
364 | linux_off_t offset); } | 365 | linux_off_t offset); } | |
365 | 193 STD { int|linux_sys||truncate64(const char *path, \ | 366 | 193 STD { int|linux_sys||truncate64(const char *path, \ | |
366 | off_t length); } | 367 | off_t length); } | |
367 | 194 STD { int|linux_sys||ftruncate64(unsigned int fd, \ | 368 | 194 STD { int|linux_sys||ftruncate64(unsigned int fd, \ | |
368 | off_t length); } | 369 | off_t length); } | |
369 | 195 STD { int|linux_sys||stat64(const char *path, \ | 370 | 195 STD { int|linux_sys||stat64(const char *path, \ | |
370 | struct linux_stat64 *sp); } | 371 | struct linux_stat64 *sp); } | |
371 | 196 STD { int|linux_sys||lstat64(const char *path, \ | 372 | 196 STD { int|linux_sys||lstat64(const char *path, \ | |
372 | struct linux_stat64 *sp); } | 373 | struct linux_stat64 *sp); } | |
373 | 197 STD { int|linux_sys||fstat64(int fd, \ | 374 | 197 STD { int|linux_sys||fstat64(int fd, \ | |
@@ -623,27 +624,29 @@ | @@ -623,27 +624,29 @@ | |||
623 | 370 UNIMPL | 624 | 370 UNIMPL | |
624 | 371 UNIMPL | 625 | 371 UNIMPL | |
625 | 372 UNIMPL | 626 | 372 UNIMPL | |
626 | 373 UNIMPL | 627 | 373 UNIMPL | |
627 | 374 UNIMPL | 628 | 374 UNIMPL | |
628 | 375 UNIMPL | 629 | 375 UNIMPL | |
629 | 376 UNIMPL | 630 | 376 UNIMPL | |
630 | 377 UNIMPL | 631 | 377 UNIMPL | |
631 | 378 UNIMPL mlock2 | 632 | 378 UNIMPL mlock2 | |
632 | 379 UNIMPL copy_file_range | 633 | 379 UNIMPL copy_file_range | |
633 | 380 UNIMPL preadv2 | 634 | 380 UNIMPL preadv2 | |
634 | 381 UNIMPL pwritev2 | 635 | 381 UNIMPL pwritev2 | |
635 | 382 UNIMPL kexec_file_load | 636 | 382 UNIMPL kexec_file_load | |
636 | 383 UNIMPL | 637 | 383 STD { int|linux_sys||statx(int fd, const char *path, \ | |
638 | int flag, unsigned int mask, \ | |||
639 | struct linux_statx *sp); } | |||
637 | 384 UNIMPL | 640 | 384 UNIMPL | |
638 | 385 UNIMPL | 641 | 385 UNIMPL | |
639 | 386 UNIMPL | 642 | 386 UNIMPL | |
640 | 387 UNIMPL | 643 | 387 UNIMPL | |
641 | 388 UNIMPL | 644 | 388 UNIMPL | |
642 | 389 UNIMPL | 645 | 389 UNIMPL | |
643 | 390 UNIMPL | 646 | 390 UNIMPL | |
644 | 391 UNIMPL | 647 | 391 UNIMPL | |
645 | 392 UNIMPL | 648 | 392 UNIMPL | |
646 | 393 UNIMPL | 649 | 393 UNIMPL | |
647 | 394 UNIMPL | 650 | 394 UNIMPL | |
648 | 395 UNIMPL | 651 | 395 UNIMPL | |
649 | 396 UNIMPL | 652 | 396 UNIMPL | |
@@ -676,22 +679,23 @@ | @@ -676,22 +679,23 @@ | |||
676 | 423 UNIMPL | 679 | 423 UNIMPL | |
677 | 424 UNIMPL | 680 | 424 UNIMPL | |
678 | 425 UNIMPL | 681 | 425 UNIMPL | |
679 | 426 UNIMPL | 682 | 426 UNIMPL | |
680 | 427 UNIMPL | 683 | 427 UNIMPL | |
681 | 428 UNIMPL | 684 | 428 UNIMPL | |
682 | 429 UNIMPL | 685 | 429 UNIMPL | |
683 | 430 UNIMPL | 686 | 430 UNIMPL | |
684 | 431 UNIMPL | 687 | 431 UNIMPL | |
685 | 432 UNIMPL | 688 | 432 UNIMPL | |
686 | 433 UNIMPL | 689 | 433 UNIMPL | |
687 | 434 UNIMPL | 690 | 434 UNIMPL | |
688 | 435 UNIMPL | 691 | 435 UNIMPL | |
689 | 436 UNIMPL | 692 | 436 STD { int|linux_sys||close_range(unsigned int first, \ | |
693 | unsigned int last, unsigned int flags); } | |||
690 | 437 UNIMPL | 694 | 437 UNIMPL | |
691 | 438 UNIMPL | 695 | 438 UNIMPL | |
692 | 439 UNIMPL | 696 | 439 UNIMPL | |
693 | 440 UNIMPL | 697 | 440 UNIMPL | |
694 | 441 STD { int|linux_sys||epoll_pwait2(int epfd, \ | 698 | 441 STD { int|linux_sys||epoll_pwait2(int epfd, \ | |
695 | struct linux_epoll_event *events, int maxevents, \ | 699 | struct linux_epoll_event *events, int maxevents, \ | |
696 | const struct linux_timespec *timeout, \ | 700 | const struct linux_timespec *timeout, \ | |
697 | const linux_sigset_t *sigmask); } | 701 | const linux_sigset_t *sigmask); } |
--- src/sys/compat/linux/common/linux_file64.c 2021/11/25 02:27:08 1.67
+++ src/sys/compat/linux/common/linux_file64.c 2023/07/29 15:04:29 1.68
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: linux_file64.c,v 1.67 2021/11/25 02:27:08 ryo Exp $ */ | 1 | /* $NetBSD: linux_file64.c,v 1.68 2023/07/29 15:04:29 christos Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 1995, 1998, 2000, 2008 The NetBSD Foundation, Inc. | 4 | * Copyright (c) 1995, 1998, 2000, 2008 The NetBSD Foundation, Inc. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to The NetBSD Foundation | 7 | * This code is derived from software contributed to The NetBSD Foundation | |
8 | * by Frank van der Linden and Eric Haszlakiewicz. | 8 | * by Frank van der Linden and Eric Haszlakiewicz. | |
9 | * | 9 | * | |
10 | * Redistribution and use in source and binary forms, with or without | 10 | * Redistribution and use in source and binary forms, with or without | |
11 | * modification, are permitted provided that the following conditions | 11 | * modification, are permitted provided that the following conditions | |
12 | * are met: | 12 | * are met: | |
13 | * 1. Redistributions of source code must retain the above copyright | 13 | * 1. Redistributions of source code must retain the above copyright | |
14 | * notice, this list of conditions and the following disclaimer. | 14 | * notice, this list of conditions and the following disclaimer. | |
@@ -24,27 +24,27 @@ | @@ -24,27 +24,27 @@ | |||
24 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | 24 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
25 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | 25 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | |
26 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | 26 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | |
27 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | 27 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
28 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | 28 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
29 | * POSSIBILITY OF SUCH DAMAGE. | 29 | * POSSIBILITY OF SUCH DAMAGE. | |
30 | */ | 30 | */ | |
31 | 31 | |||
32 | /* | 32 | /* | |
33 | * Linux 64bit filesystem calls. Used on 32bit archs, not used on 64bit ones. | 33 | * Linux 64bit filesystem calls. Used on 32bit archs, not used on 64bit ones. | |
34 | */ | 34 | */ | |
35 | 35 | |||
36 | #include <sys/cdefs.h> | 36 | #include <sys/cdefs.h> | |
37 | __KERNEL_RCSID(0, "$NetBSD: linux_file64.c,v 1.67 2021/11/25 02:27:08 ryo Exp $"); | 37 | __KERNEL_RCSID(0, "$NetBSD: linux_file64.c,v 1.68 2023/07/29 15:04:29 christos Exp $"); | |
38 | 38 | |||
39 | #include <sys/param.h> | 39 | #include <sys/param.h> | |
40 | #include <sys/systm.h> | 40 | #include <sys/systm.h> | |
41 | #include <sys/namei.h> | 41 | #include <sys/namei.h> | |
42 | #include <sys/proc.h> | 42 | #include <sys/proc.h> | |
43 | #include <sys/dirent.h> | 43 | #include <sys/dirent.h> | |
44 | #include <sys/file.h> | 44 | #include <sys/file.h> | |
45 | #include <sys/stat.h> | 45 | #include <sys/stat.h> | |
46 | #include <sys/filedesc.h> | 46 | #include <sys/filedesc.h> | |
47 | #include <sys/ioctl.h> | 47 | #include <sys/ioctl.h> | |
48 | #include <sys/kernel.h> | 48 | #include <sys/kernel.h> | |
49 | #include <sys/mount.h> | 49 | #include <sys/mount.h> | |
50 | #include <sys/malloc.h> | 50 | #include <sys/malloc.h> | |
@@ -242,26 +242,30 @@ linux_sys_lstat64(struct lwp *l, const s | @@ -242,26 +242,30 @@ linux_sys_lstat64(struct lwp *l, const s | |||
242 | /* | 242 | /* | |
243 | * This is an internal function for the *statat() variant of linux, | 243 | * This is an internal function for the *statat() variant of linux, | |
244 | * which returns struct stat, but flags and other handling are | 244 | * which returns struct stat, but flags and other handling are | |
245 | * the same as in linux. | 245 | * the same as in linux. | |
246 | */ | 246 | */ | |
247 | int | 247 | int | |
248 | linux_statat(struct lwp *l, int fd, const char *path, int lflag, | 248 | linux_statat(struct lwp *l, int fd, const char *path, int lflag, | |
249 | struct stat *st) | 249 | struct stat *st) | |
250 | { | 250 | { | |
251 | struct vnode *vp; | 251 | struct vnode *vp; | |
252 | int error, nd_flag; | 252 | int error, nd_flag; | |
253 | uint8_t c; | 253 | uint8_t c; | |
254 | 254 | |||
255 | if (lflag & ~(LINUX_AT_EMPTY_PATH|LINUX_AT_NO_AUTOMOUNT | |||
256 | |LINUX_AT_SYMLINK_NOFOLLOW)) | |||
257 | return EINVAL; | |||
258 | ||||
255 | if (lflag & LINUX_AT_EMPTY_PATH) { | 259 | if (lflag & LINUX_AT_EMPTY_PATH) { | |
256 | /* | 260 | /* | |
257 | * If path is null string: | 261 | * If path is null string: | |
258 | */ | 262 | */ | |
259 | error = ufetch_8(path, &c); | 263 | error = ufetch_8(path, &c); | |
260 | if (error != 0) | 264 | if (error != 0) | |
261 | return error; | 265 | return error; | |
262 | if (c == '\0') { | 266 | if (c == '\0') { | |
263 | if (fd == LINUX_AT_FDCWD) { | 267 | if (fd == LINUX_AT_FDCWD) { | |
264 | /* | 268 | /* | |
265 | * operate on current directory | 269 | * operate on current directory | |
266 | */ | 270 | */ | |
267 | vp = l->l_proc->p_cwdi->cwdi_cdir; | 271 | vp = l->l_proc->p_cwdi->cwdi_cdir; |
--- src/sys/compat/linux/common/linux_misc.c 2023/07/29 07:00:00 1.259
+++ src/sys/compat/linux/common/linux_misc.c 2023/07/29 15:04:29 1.260
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: linux_misc.c,v 1.259 2023/07/29 07:00:00 rin Exp $ */ | 1 | /* $NetBSD: linux_misc.c,v 1.260 2023/07/29 15:04:29 christos Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 1995, 1998, 1999, 2008 The NetBSD Foundation, Inc. | 4 | * Copyright (c) 1995, 1998, 1999, 2008 The NetBSD Foundation, Inc. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to The NetBSD Foundation | 7 | * This code is derived from software contributed to The NetBSD Foundation | |
8 | * by Frank van der Linden and Eric Haszlakiewicz; by Jason R. Thorpe | 8 | * by Frank van der Linden and Eric Haszlakiewicz; by Jason R. Thorpe | |
9 | * of the Numerical Aerospace Simulation Facility, NASA Ames Research Center. | 9 | * of the Numerical Aerospace Simulation Facility, NASA Ames Research Center. | |
10 | * | 10 | * | |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without | |
12 | * modification, are permitted provided that the following conditions | 12 | * modification, are permitted provided that the following conditions | |
13 | * are met: | 13 | * are met: | |
14 | * 1. Redistributions of source code must retain the above copyright | 14 | * 1. Redistributions of source code must retain the above copyright | |
@@ -47,27 +47,27 @@ | @@ -47,27 +47,27 @@ | |||
47 | * linux_sys_readdir : linux_misc_notalpha.c | 47 | * linux_sys_readdir : linux_misc_notalpha.c | |
48 | * linux_sys_setresgid : linux_misc_notalpha.c | 48 | * linux_sys_setresgid : linux_misc_notalpha.c | |
49 | * linux_sys_time : linux_misc_notalpha.c | 49 | * linux_sys_time : linux_misc_notalpha.c | |
50 | * linux_sys_utime : linux_misc_notalpha.c | 50 | * linux_sys_utime : linux_misc_notalpha.c | |
51 | * linux_sys_waitpid : linux_misc_notalpha.c | 51 | * linux_sys_waitpid : linux_misc_notalpha.c | |
52 | * linux_sys_old_mmap : linux_oldmmap.c | 52 | * linux_sys_old_mmap : linux_oldmmap.c | |
53 | * linux_sys_oldolduname : linux_oldolduname.c | 53 | * linux_sys_oldolduname : linux_oldolduname.c | |
54 | * linux_sys_oldselect : linux_oldselect.c | 54 | * linux_sys_oldselect : linux_oldselect.c | |
55 | * linux_sys_olduname : linux_olduname.c | 55 | * linux_sys_olduname : linux_olduname.c | |
56 | * linux_sys_pipe : linux_pipe.c | 56 | * linux_sys_pipe : linux_pipe.c | |
57 | */ | 57 | */ | |
58 | 58 | |||
59 | #include <sys/cdefs.h> | 59 | #include <sys/cdefs.h> | |
60 | __KERNEL_RCSID(0, "$NetBSD: linux_misc.c,v 1.259 2023/07/29 07:00:00 rin Exp $"); | 60 | __KERNEL_RCSID(0, "$NetBSD: linux_misc.c,v 1.260 2023/07/29 15:04:29 christos Exp $"); | |
61 | 61 | |||
62 | #include <sys/param.h> | 62 | #include <sys/param.h> | |
63 | #include <sys/systm.h> | 63 | #include <sys/systm.h> | |
64 | #include <sys/namei.h> | 64 | #include <sys/namei.h> | |
65 | #include <sys/proc.h> | 65 | #include <sys/proc.h> | |
66 | #include <sys/dirent.h> | 66 | #include <sys/dirent.h> | |
67 | #include <sys/epoll.h> | 67 | #include <sys/epoll.h> | |
68 | #include <sys/eventfd.h> | 68 | #include <sys/eventfd.h> | |
69 | #include <sys/file.h> | 69 | #include <sys/file.h> | |
70 | #include <sys/stat.h> | 70 | #include <sys/stat.h> | |
71 | #include <sys/filedesc.h> | 71 | #include <sys/filedesc.h> | |
72 | #include <sys/ioctl.h> | 72 | #include <sys/ioctl.h> | |
73 | #include <sys/kernel.h> | 73 | #include <sys/kernel.h> | |
@@ -1967,13 +1967,93 @@ linux_sys_memfd_create(struct lwp *l, | @@ -1967,13 +1967,93 @@ linux_sys_memfd_create(struct lwp *l, | |||
1967 | return error; | 1967 | return error; | |
1968 | } | 1968 | } | |
1969 | 1969 | |||
1970 | if (lflags & ~LINUX_MFD_KNOWN_FLAGS) { | 1970 | if (lflags & ~LINUX_MFD_KNOWN_FLAGS) { | |
1971 | DPRINTF(("linux_sys_memfd_create: ignored flags %x\n", | 1971 | DPRINTF(("linux_sys_memfd_create: ignored flags %x\n", | |
1972 | lflags & ~LINUX_MFD_KNOWN_FLAGS)); | 1972 | lflags & ~LINUX_MFD_KNOWN_FLAGS)); | |
1973 | } | 1973 | } | |
1974 | 1974 | |||
1975 | SCARG(&muap, name) = SCARG(uap, name); | 1975 | SCARG(&muap, name) = SCARG(uap, name); | |
1976 | SCARG(&muap, flags) = lflags & LINUX_MFD_KNOWN_FLAGS; | 1976 | SCARG(&muap, flags) = lflags & LINUX_MFD_KNOWN_FLAGS; | |
1977 | 1977 | |||
1978 | return sys_memfd_create(l, &muap, retval); | 1978 | return sys_memfd_create(l, &muap, retval); | |
1979 | } | 1979 | } | |
1980 | ||||
1981 | #define LINUX_CLOSE_RANGE_UNSHARE 0x02U | |||
1982 | #define LINUX_CLOSE_RANGE_CLOEXEC 0x04U | |||
1983 | ||||
1984 | /* | |||
1985 | * close_range(2). | |||
1986 | */ | |||
1987 | int | |||
1988 | linux_sys_close_range(struct lwp *l, | |||
1989 | const struct linux_sys_close_range_args *uap, register_t *retval) | |||
1990 | { | |||
1991 | /* { | |||
1992 | syscallarg(unsigned int) first; | |||
1993 | syscallarg(unsigned int) last; | |||
1994 | syscallarg(unsigned int) flags; | |||
1995 | } */ | |||
1996 | unsigned int fd, last; | |||
1997 | file_t *fp; | |||
1998 | filedesc_t *fdp; | |||
1999 | const unsigned int flags = SCARG(uap, flags); | |||
2000 | ||||
2001 | if (flags & ~(LINUX_CLOSE_RANGE_CLOEXEC|LINUX_CLOSE_RANGE_UNSHARE)) | |||
2002 | return EINVAL; | |||
2003 | if (SCARG(uap, first) > SCARG(uap, last)) | |||
2004 | return EINVAL; | |||
2005 | ||||
2006 | if (flags & LINUX_CLOSE_RANGE_UNSHARE) { | |||
2007 | fdp = fd_copy(); | |||
2008 | fd_free(); | |||
2009 | l->l_proc->p_fd = fdp; | |||
2010 | l->l_fd = fdp; | |||
2011 | } | |||
2012 | ||||
2013 | last = MIN(SCARG(uap, last), l->l_proc->p_fd->fd_lastfile); | |||
2014 | for (fd = SCARG(uap, first); fd <= last; fd++) { | |||
2015 | fp = fd_getfile(fd); | |||
2016 | if (fp == NULL) | |||
2017 | continue; | |||
2018 | ||||
2019 | if (flags & LINUX_CLOSE_RANGE_CLOEXEC) { | |||
2020 | fd_set_exclose(l, fd, true); | |||
2021 | fd_putfile(fd); | |||
2022 | } else | |||
2023 | fd_close(fd); | |||
2024 | } | |||
2025 | ||||
2026 | return 0; | |||
2027 | } | |||
2028 | ||||
2029 | /* | |||
2030 | * readahead(2). Call posix_fadvise with POSIX_FADV_WILLNEED with some extra | |||
2031 | * error checking. | |||
2032 | */ | |||
2033 | int | |||
2034 | linux_sys_readahead(struct lwp *l, const struct linux_sys_readahead_args *uap, | |||
2035 | register_t *retval) | |||
2036 | { | |||
2037 | /* { | |||
2038 | syscallarg(int) fd; | |||
2039 | syscallarg(off_t) offset; | |||
2040 | syscallarg(size_t) count; | |||
2041 | } */ | |||
2042 | file_t *fp; | |||
2043 | int error = 0; | |||
2044 | const int fd = SCARG(uap, fd); | |||
2045 | ||||
2046 | fp = fd_getfile(fd); | |||
2047 | if (fp == NULL) | |||
2048 | return EBADF; | |||
2049 | if ((fp->f_flag & FREAD) == 0) | |||
2050 | error = EBADF; | |||
2051 | else if (fp->f_type != DTYPE_VNODE || fp->f_vnode->v_type != VREG) | |||
2052 | error = EINVAL; | |||
2053 | fd_putfile(fd); | |||
2054 | if (error != 0) | |||
2055 | return error; | |||
2056 | ||||
2057 | return do_posix_fadvise(fd, SCARG(uap, offset), SCARG(uap, count), | |||
2058 | POSIX_FADV_WILLNEED); | |||
2059 | } |