Mon Jan 2 16:32:10 2017 UTC ()
Add pselect6 Linux system call.
This lets Matlab R2016A run on NetBSD/amd64


(manu)
diff -r1.91 -r1.92 src/sys/compat/linux/arch/alpha/syscalls.master
diff -r1.57 -r1.58 src/sys/compat/linux/arch/amd64/syscalls.master
diff -r1.64 -r1.65 src/sys/compat/linux/arch/arm/syscalls.master
diff -r1.121 -r1.122 src/sys/compat/linux/arch/i386/syscalls.master
diff -r1.90 -r1.91 src/sys/compat/linux/arch/m68k/syscalls.master
diff -r1.60 -r1.61 src/sys/compat/linux/arch/mips/syscalls.master
diff -r1.69 -r1.70 src/sys/compat/linux/arch/powerpc/syscalls.master
diff -r1.233 -r1.234 src/sys/compat/linux/common/linux_misc.c
diff -r1.30 -r1.31 src/sys/compat/linux/common/linux_signal.h

cvs diff -r1.91 -r1.92 src/sys/compat/linux/arch/alpha/syscalls.master (expand / switch to unified diff)

--- src/sys/compat/linux/arch/alpha/syscalls.master 2016/07/24 13:22:01 1.91
+++ src/sys/compat/linux/arch/alpha/syscalls.master 2017/01/02 16:32:09 1.92
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1 $NetBSD: syscalls.master,v 1.91 2016/07/24 13:22:01 njoly Exp $ 1 $NetBSD: syscalls.master,v 1.92 2017/01/02 16:32:09 manu 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
@@ -721,27 +721,30 @@ @@ -721,27 +721,30 @@
721 int flag); } 721 int flag); }
722457 NOARGS { int|sys||renameat(int fromfd, const char *from, \ 722457 NOARGS { int|sys||renameat(int fromfd, const char *from, \
723 int tofd, const char *to); } 723 int tofd, const char *to); }
724458 STD { int|linux_sys||linkat(int fd1, const char *name1, \ 724458 STD { int|linux_sys||linkat(int fd1, const char *name1, \
725 int fd2, const char *name2, int flags); } 725 int fd2, const char *name2, int flags); }
726459 NOARGS { int|sys||symlinkat(const char *path1, int fd, \ 726459 NOARGS { int|sys||symlinkat(const char *path1, int fd, \
727 const char *path2); } 727 const char *path2); }
728460 NOARGS { ssize_t|sys||readlinkat(int fd, const char *path, \ 728460 NOARGS { ssize_t|sys||readlinkat(int fd, const char *path, \
729 char *buf, size_t bufsize); } 729 char *buf, size_t bufsize); }
730461 STD { int|linux_sys||fchmodat(int fd, const char *path, \ 730461 STD { int|linux_sys||fchmodat(int fd, const char *path, \
731 linux_umode_t mode); } 731 linux_umode_t mode); }
732462 STD { int|linux_sys||faccessat(int fd, const char *path, \ 732462 STD { int|linux_sys||faccessat(int fd, const char *path, \
733 int amode); } 733 int amode); }
734463 UNIMPL pselect6 734463 STD { int|linux_sys||pselect6(int nfds, fd_set *readfds, \
 735 fd_set *writefds, fd_set *exceptfds, \
 736 struct linux_timespec *timeout, \
 737 linux_sized_sigset_t *ss); }
735464 STD { int|linux_sys||ppoll(struct pollfd *fds, u_int nfds, \ 738464 STD { int|linux_sys||ppoll(struct pollfd *fds, u_int nfds, \
736 struct linux_timespec *timeout, \ 739 struct linux_timespec *timeout, \
737 linux_sigset_t *sigset); } 740 linux_sigset_t *sigset); }
738465 UNIMPL unshare 741465 UNIMPL unshare
739466 STD { int|linux_sys||set_robust_list( \ 742466 STD { int|linux_sys||set_robust_list( \
740 struct linux_robust_list_head *head, size_t len); } 743 struct linux_robust_list_head *head, size_t len); }
741467 STD { int|linux_sys||get_robust_list(int pid, \ 744467 STD { int|linux_sys||get_robust_list(int pid, \
742 struct linux_robust_list_head **head, \ 745 struct linux_robust_list_head **head, \
743 size_t *len); } 746 size_t *len); }
744468 UNIMPL splice 747468 UNIMPL splice
745469 UNIMPL sync_file_range 748469 UNIMPL sync_file_range
746470 UNIMPL tee 749470 UNIMPL tee
747471 UNIMPL vmsplice 750471 UNIMPL vmsplice

cvs diff -r1.57 -r1.58 src/sys/compat/linux/arch/amd64/syscalls.master (expand / switch to unified diff)

--- src/sys/compat/linux/arch/amd64/syscalls.master 2016/07/24 13:22:01 1.57
+++ src/sys/compat/linux/arch/amd64/syscalls.master 2017/01/02 16:32:09 1.58
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1 $NetBSD: syscalls.master,v 1.57 2016/07/24 13:22:01 njoly Exp $ 1 $NetBSD: syscalls.master,v 1.58 2017/01/02 16:32:09 manu 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
@@ -479,27 +479,30 @@ @@ -479,27 +479,30 @@
479 int flag); } 479 int flag); }
480264 NOARGS { int|sys||renameat(int fromfd, const char *from, \ 480264 NOARGS { int|sys||renameat(int fromfd, const char *from, \
481 int tofd, const char *to); } 481 int tofd, const char *to); }
482265 STD { int|linux_sys||linkat(int fd1, const char *name1, \ 482265 STD { int|linux_sys||linkat(int fd1, const char *name1, \
483 int fd2, const char *name2, int flags); } 483 int fd2, const char *name2, int flags); }
484266 NOARGS { int|sys||symlinkat(const char *path1, int fd, \ 484266 NOARGS { int|sys||symlinkat(const char *path1, int fd, \
485 const char *path2); } 485 const char *path2); }
486267 NOARGS { ssize_t|sys||readlinkat(int fd, const char *path, \ 486267 NOARGS { ssize_t|sys||readlinkat(int fd, const char *path, \
487 char *buf, size_t bufsize); } 487 char *buf, size_t bufsize); }
488268 STD { int|linux_sys||fchmodat(int fd, const char *path, \ 488268 STD { int|linux_sys||fchmodat(int fd, const char *path, \
489 linux_umode_t mode); } 489 linux_umode_t mode); }
490269 STD { int|linux_sys||faccessat(int fd, const char *path, \ 490269 STD { int|linux_sys||faccessat(int fd, const char *path, \
491 int amode); } 491 int amode); }
492270 UNIMPL pselect6 492270 STD { int|linux_sys||pselect6(int nfds, fd_set *readfds, \
 493 fd_set *writefds, fd_set *exceptfds, \
 494 struct linux_timespec *timeout, \
 495 linux_sized_sigset_t *ss); }
493271 STD { int|linux_sys||ppoll(struct pollfd *fds, u_int nfds, \ 496271 STD { int|linux_sys||ppoll(struct pollfd *fds, u_int nfds, \
494 struct linux_timespec *timeout, \ 497 struct linux_timespec *timeout, \
495 linux_sigset_t *sigset); } 498 linux_sigset_t *sigset); }
496272 UNIMPL unshare 499272 UNIMPL unshare
497273 STD { int|linux_sys||set_robust_list( \ 500273 STD { int|linux_sys||set_robust_list( \
498 struct linux_robust_list_head *head, size_t len); } 501 struct linux_robust_list_head *head, size_t len); }
499274 STD { int|linux_sys||get_robust_list(int pid, \ 502274 STD { int|linux_sys||get_robust_list(int pid, \
500 struct linux_robust_list_head **head, \ 503 struct linux_robust_list_head **head, \
501 size_t *len); } 504 size_t *len); }
502275 UNIMPL splice 505275 UNIMPL splice
503276 UNIMPL tee 506276 UNIMPL tee
504277 UNIMPL sync_file_range 507277 UNIMPL sync_file_range
505278 UNIMPL vmsplice 508278 UNIMPL vmsplice

cvs diff -r1.64 -r1.65 src/sys/compat/linux/arch/arm/syscalls.master (expand / switch to unified diff)

--- src/sys/compat/linux/arch/arm/syscalls.master 2016/07/24 13:22:01 1.64
+++ src/sys/compat/linux/arch/arm/syscalls.master 2017/01/02 16:32:09 1.65
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1 $NetBSD: syscalls.master,v 1.64 2016/07/24 13:22:01 njoly Exp $ 1 $NetBSD: syscalls.master,v 1.65 2017/01/02 16:32:09 manu 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:
@@ -520,27 +520,30 @@ @@ -520,27 +520,30 @@
520 int flag); } 520 int flag); }
521329 NOARGS { int|sys||renameat(int fromfd, const char *from, \ 521329 NOARGS { int|sys||renameat(int fromfd, const char *from, \
522 int tofd, const char *to); } 522 int tofd, const char *to); }
523330 STD { int|linux_sys||linkat(int fd1, const char *name1, \ 523330 STD { int|linux_sys||linkat(int fd1, const char *name1, \
524 int fd2, const char *name2, int flags); } 524 int fd2, const char *name2, int flags); }
525331 NOARGS { int|sys||symlinkat(const char *path1, int fd, \ 525331 NOARGS { int|sys||symlinkat(const char *path1, int fd, \
526 const char *path2); } 526 const char *path2); }
527332 NOARGS { ssize_t|sys||readlinkat(int fd, const char *path, \ 527332 NOARGS { ssize_t|sys||readlinkat(int fd, const char *path, \
528 char *buf, size_t bufsize); } 528 char *buf, size_t bufsize); }
529333 STD { int|linux_sys||fchmodat(int fd, const char *path, \ 529333 STD { int|linux_sys||fchmodat(int fd, const char *path, \
530 linux_umode_t mode); } 530 linux_umode_t mode); }
531334 STD { int|linux_sys||faccessat(int fd, const char *path, \ 531334 STD { int|linux_sys||faccessat(int fd, const char *path, \
532 int amode); } 532 int amode); }
533335 UNIMPL pselect6 533335 STD { int|linux_sys||pselect6(int nfds, fd_set *readfds, \
 534 fd_set *writefds, fd_set *exceptfds, \
 535 struct linux_timespec *timeout, \
 536 linux_sized_sigset_t *ss); }
534336 STD { int|linux_sys||ppoll(struct pollfd *fds, u_int nfds, \ 537336 STD { int|linux_sys||ppoll(struct pollfd *fds, u_int nfds, \
535 struct linux_timespec *timeout, \ 538 struct linux_timespec *timeout, \
536 linux_sigset_t *sigset); } 539 linux_sigset_t *sigset); }
537337 UNIMPL unshare 540337 UNIMPL unshare
538338 STD { int|linux_sys||set_robust_list( \ 541338 STD { int|linux_sys||set_robust_list( \
539 struct linux_robust_list_head *head, size_t len); } 542 struct linux_robust_list_head *head, size_t len); }
540339 STD { int|linux_sys||get_robust_list(int pid, \ 543339 STD { int|linux_sys||get_robust_list(int pid, \
541 struct linux_robust_list_head **head, \ 544 struct linux_robust_list_head **head, \
542 size_t *len); } 545 size_t *len); }
543340 UNIMPL splice 546340 UNIMPL splice
544341 UNIMPL sync_file_range2 547341 UNIMPL sync_file_range2
545342 UNIMPL tee 548342 UNIMPL tee
546343 UNIMPL vmsplice 549343 UNIMPL vmsplice

cvs diff -r1.121 -r1.122 src/sys/compat/linux/arch/i386/syscalls.master (expand / switch to unified diff)

--- src/sys/compat/linux/arch/i386/syscalls.master 2016/07/24 13:22:01 1.121
+++ src/sys/compat/linux/arch/i386/syscalls.master 2017/01/02 16:32:09 1.122
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1 $NetBSD: syscalls.master,v 1.121 2016/07/24 13:22:01 njoly Exp $ 1 $NetBSD: syscalls.master,v 1.122 2017/01/02 16:32:09 manu 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
@@ -493,27 +493,30 @@ @@ -493,27 +493,30 @@
493 int flag); } 493 int flag); }
494302 NOARGS { int|sys||renameat(int fromfd, const char *from, \ 494302 NOARGS { int|sys||renameat(int fromfd, const char *from, \
495 int tofd, const char *to); } 495 int tofd, const char *to); }
496303 STD { int|linux_sys||linkat(int fd1, const char *name1, \ 496303 STD { int|linux_sys||linkat(int fd1, const char *name1, \
497 int fd2, const char *name2, int flags); } 497 int fd2, const char *name2, int flags); }
498304 NOARGS { int|sys||symlinkat(const char *path1, int fd, \ 498304 NOARGS { int|sys||symlinkat(const char *path1, int fd, \
499 const char *path2); } 499 const char *path2); }
500305 NOARGS { ssize_t|sys||readlinkat(int fd, const char *path, \ 500305 NOARGS { ssize_t|sys||readlinkat(int fd, const char *path, \
501 char *buf, size_t bufsize); } 501 char *buf, size_t bufsize); }
502306 STD { int|linux_sys||fchmodat(int fd, const char *path, \ 502306 STD { int|linux_sys||fchmodat(int fd, const char *path, \
503 linux_umode_t mode); } 503 linux_umode_t mode); }
504307 STD { int|linux_sys||faccessat(int fd, const char *path, \ 504307 STD { int|linux_sys||faccessat(int fd, const char *path, \
505 int amode); } 505 int amode); }
506308 UNIMPL pselect6 506308 STD { int|linux_sys||pselect6(int nfds, fd_set *readfds, \
 507 fd_set *writefds, fd_set *exceptfds, \
 508 struct linux_timespec *timeout, \
 509 linux_sized_sigset_t *ss); }
507309 STD { int|linux_sys||ppoll(struct pollfd *fds, u_int nfds, \ 510309 STD { int|linux_sys||ppoll(struct pollfd *fds, u_int nfds, \
508 struct linux_timespec *timeout, \ 511 struct linux_timespec *timeout, \
509 linux_sigset_t *sigset); } 512 linux_sigset_t *sigset); }
510310 UNIMPL unshare 513310 UNIMPL unshare
511311 STD { int|linux_sys||set_robust_list( \ 514311 STD { int|linux_sys||set_robust_list( \
512 struct linux_robust_list_head *head, size_t len); } 515 struct linux_robust_list_head *head, size_t len); }
513312 STD { int|linux_sys||get_robust_list(int pid, \ 516312 STD { int|linux_sys||get_robust_list(int pid, \
514 struct linux_robust_list_head **head, \ 517 struct linux_robust_list_head **head, \
515 size_t *len); } 518 size_t *len); }
516313 UNIMPL splice 519313 UNIMPL splice
517314 UNIMPL sync_file_range 520314 UNIMPL sync_file_range
518315 UNIMPL tee 521315 UNIMPL tee
519316 UNIMPL vmsplice 522316 UNIMPL vmsplice

cvs diff -r1.90 -r1.91 src/sys/compat/linux/arch/m68k/syscalls.master (expand / switch to unified diff)

--- src/sys/compat/linux/arch/m68k/syscalls.master 2016/07/24 13:22:01 1.90
+++ src/sys/compat/linux/arch/m68k/syscalls.master 2017/01/02 16:32:09 1.91
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1 $NetBSD: syscalls.master,v 1.90 2016/07/24 13:22:01 njoly Exp $ 1 $NetBSD: syscalls.master,v 1.91 2017/01/02 16:32:09 manu 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
@@ -501,27 +501,30 @@ @@ -501,27 +501,30 @@
501 int flag); } 501 int flag); }
502295 NOARGS { int|sys||renameat(int fromfd, const char *from, \ 502295 NOARGS { int|sys||renameat(int fromfd, const char *from, \
503 int tofd, const char *to); } 503 int tofd, const char *to); }
504296 STD { int|linux_sys||linkat(int fd1, const char *name1, \ 504296 STD { int|linux_sys||linkat(int fd1, const char *name1, \
505 int fd2, const char *name2, int flags); } 505 int fd2, const char *name2, int flags); }
506297 NOARGS { int|sys||symlinkat(const char *path1, int fd, \ 506297 NOARGS { int|sys||symlinkat(const char *path1, int fd, \
507 const char *path2); } 507 const char *path2); }
508298 NOARGS { ssize_t|sys||readlinkat(int fd, const char *path, \ 508298 NOARGS { ssize_t|sys||readlinkat(int fd, const char *path, \
509 char *buf, size_t bufsize); } 509 char *buf, size_t bufsize); }
510299 STD { int|linux_sys||fchmodat(int fd, const char *path, \ 510299 STD { int|linux_sys||fchmodat(int fd, const char *path, \
511 linux_umode_t mode); } 511 linux_umode_t mode); }
512300 STD { int|linux_sys||faccessat(int fd, const char *path, \ 512300 STD { int|linux_sys||faccessat(int fd, const char *path, \
513 int amode); } 513 int amode); }
514301 UNIMPL pselect6 514301 STD { int|linux_sys||pselect6(int nfds, fd_set *readfds, \
 515 fd_set *writefds, fd_set *exceptfds, \
 516 struct linux_timespec *timeout, \
 517 linux_sized_sigset_t *ss); }
515302 STD { int|linux_sys||ppoll(struct pollfd *fds, u_int nfds, \ 518302 STD { int|linux_sys||ppoll(struct pollfd *fds, u_int nfds, \
516 struct linux_timespec *timeout, \ 519 struct linux_timespec *timeout, \
517 linux_sigset_t *sigset); } 520 linux_sigset_t *sigset); }
518303 UNIMPL unshare 521303 UNIMPL unshare
519304 STD { int|linux_sys||set_robust_list( \ 522304 STD { int|linux_sys||set_robust_list( \
520 struct linux_robust_list_head *head, size_t len); } 523 struct linux_robust_list_head *head, size_t len); }
521305 STD { int|linux_sys||get_robust_list(int pid, \ 524305 STD { int|linux_sys||get_robust_list(int pid, \
522 struct linux_robust_list_head **head, \ 525 struct linux_robust_list_head **head, \
523 size_t *len); } 526 size_t *len); }
524306 UNIMPL splice 527306 UNIMPL splice
525307 UNIMPL sync_file_range 528307 UNIMPL sync_file_range
526308 UNIMPL tee 529308 UNIMPL tee
527309 UNIMPL vmsplice 530309 UNIMPL vmsplice

cvs diff -r1.60 -r1.61 src/sys/compat/linux/arch/mips/syscalls.master (expand / switch to unified diff)

--- src/sys/compat/linux/arch/mips/syscalls.master 2016/07/24 13:22:01 1.60
+++ src/sys/compat/linux/arch/mips/syscalls.master 2017/01/02 16:32:10 1.61
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1 $NetBSD: syscalls.master,v 1.60 2016/07/24 13:22:01 njoly Exp $  1 $NetBSD: syscalls.master,v 1.61 2017/01/02 16:32:10 manu 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;
@@ -491,27 +491,30 @@ @@ -491,27 +491,30 @@
491 int flag); } 491 int flag); }
492295 NOARGS { int|sys||renameat(int fromfd, const char *from, \ 492295 NOARGS { int|sys||renameat(int fromfd, const char *from, \
493 int tofd, const char *to); } 493 int tofd, const char *to); }
494296 STD { int|linux_sys||linkat(int fd1, const char *name1, \ 494296 STD { int|linux_sys||linkat(int fd1, const char *name1, \
495 int fd2, const char *name2, int flags); } 495 int fd2, const char *name2, int flags); }
496297 NOARGS { int|sys||symlinkat(const char *path1, int fd, \ 496297 NOARGS { int|sys||symlinkat(const char *path1, int fd, \
497 const char *path2); } 497 const char *path2); }
498298 NOARGS { ssize_t|sys||readlinkat(int fd, const char *path, \ 498298 NOARGS { ssize_t|sys||readlinkat(int fd, const char *path, \
499 char *buf, size_t bufsize); } 499 char *buf, size_t bufsize); }
500299 STD { int|linux_sys||fchmodat(int fd, const char *path, \ 500299 STD { int|linux_sys||fchmodat(int fd, const char *path, \
501 linux_umode_t mode); } 501 linux_umode_t mode); }
502300 STD { int|linux_sys||faccessat(int fd, const char *path, \ 502300 STD { int|linux_sys||faccessat(int fd, const char *path, \
503 int amode); } 503 int amode); }
504301 UNIMPL pselect6 504301 STD { int|linux_sys||pselect6(int nfds, fd_set *readfds, \
 505 fd_set *writefds, fd_set *exceptfds, \
 506 struct linux_timespec *timeout, \
 507 linux_sized_sigset_t *ss); }
505302 STD { int|linux_sys||ppoll(struct pollfd *fds, u_int nfds, \ 508302 STD { int|linux_sys||ppoll(struct pollfd *fds, u_int nfds, \
506 struct linux_timespec *timeout, \ 509 struct linux_timespec *timeout, \
507 linux_sigset_t *sigset); } 510 linux_sigset_t *sigset); }
508303 UNIMPL unshare 511303 UNIMPL unshare
509304 UNIMPL splice 512304 UNIMPL splice
510305 UNIMPL sync_file_range 513305 UNIMPL sync_file_range
511306 UNIMPL tee 514306 UNIMPL tee
512307 UNIMPL vmsplice 515307 UNIMPL vmsplice
513308 UNIMPL move_pages 516308 UNIMPL move_pages
514309 STD { int|linux_sys||set_robust_list( \ 517309 STD { int|linux_sys||set_robust_list( \
515 struct linux_robust_list_head *head, size_t len); } 518 struct linux_robust_list_head *head, size_t len); }
516310 STD { int|linux_sys||get_robust_list(int pid, \ 519310 STD { int|linux_sys||get_robust_list(int pid, \
517 struct linux_robust_list_head **head, \ 520 struct linux_robust_list_head **head, \

cvs diff -r1.69 -r1.70 src/sys/compat/linux/arch/powerpc/syscalls.master (expand / switch to unified diff)

--- src/sys/compat/linux/arch/powerpc/syscalls.master 2016/07/24 13:22:01 1.69
+++ src/sys/compat/linux/arch/powerpc/syscalls.master 2017/01/02 16:32:10 1.70
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1 $NetBSD: syscalls.master,v 1.69 2016/07/24 13:22:01 njoly Exp $  1 $NetBSD: syscalls.master,v 1.70 2017/01/02 16:32:10 manu 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
@@ -468,27 +468,30 @@ @@ -468,27 +468,30 @@
468267 UNIMPL mq_getsetattr 468267 UNIMPL mq_getsetattr
469268 UNIMPL kexec_load 469268 UNIMPL kexec_load
470269 UNIMPL add_key 470269 UNIMPL add_key
471270 UNIMPL request_key 471270 UNIMPL request_key
472271 UNIMPL keyctl 472271 UNIMPL keyctl
473272 UNIMPL waitid 473272 UNIMPL waitid
474273 UNIMPL ioprio_set 474273 UNIMPL ioprio_set
475274 UNIMPL ioprio_get 475274 UNIMPL ioprio_get
476275 UNIMPL inotify_init 476275 UNIMPL inotify_init
477276 UNIMPL inotify_add_watch 477276 UNIMPL inotify_add_watch
478277 UNIMPL inotify_rm_watch 478277 UNIMPL inotify_rm_watch
479278 UNIMPL spu_run 479278 UNIMPL spu_run
480279 UNIMPL spu_create 480279 UNIMPL spu_create
481280 UNIMPL pselect6 481280 STD { int|linux_sys||pselect6(int nfds, fd_set *readfds, \
 482 fd_set *writefds, fd_set *exceptfds, \
 483 struct linux_timespec *timeout, \
 484 linux_sized_sigset_t *ss); }
482281 STD { int|linux_sys||ppoll(struct pollfd *fds, u_int nfds, \ 485281 STD { int|linux_sys||ppoll(struct pollfd *fds, u_int nfds, \
483 struct linux_timespec *timeout, \ 486 struct linux_timespec *timeout, \
484 linux_sigset_t *sigset); } 487 linux_sigset_t *sigset); }
485282 UNIMPL unshare 488282 UNIMPL unshare
486283 UNIMPL splice 489283 UNIMPL splice
487284 UNIMPL tee 490284 UNIMPL tee
488285 UNIMPL vmsplice 491285 UNIMPL vmsplice
489286 STD { int|linux_sys||openat(int fd, const char *path, \ 492286 STD { int|linux_sys||openat(int fd, const char *path, \
490 int flags, ... linux_umode_t mode); } 493 int flags, ... linux_umode_t mode); }
491287 NOARGS { int|sys||mkdirat(int fd, const char *path, \ 494287 NOARGS { int|sys||mkdirat(int fd, const char *path, \
492 linux_umode_t mode); } 495 linux_umode_t mode); }
493288 STD { int|linux_sys||mknodat(int fd, const char *path, \ 496288 STD { int|linux_sys||mknodat(int fd, const char *path, \
494 linux_umode_t mode, unsigned dev); } 497 linux_umode_t mode, unsigned dev); }

cvs diff -r1.233 -r1.234 src/sys/compat/linux/common/linux_misc.c (expand / switch to unified diff)

--- src/sys/compat/linux/common/linux_misc.c 2016/11/10 17:00:51 1.233
+++ src/sys/compat/linux/common/linux_misc.c 2017/01/02 16:32:10 1.234
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: linux_misc.c,v 1.233 2016/11/10 17:00:51 christos Exp $ */ 1/* $NetBSD: linux_misc.c,v 1.234 2017/01/02 16:32:10 manu 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.233 2016/11/10 17:00:51 christos Exp $"); 60__KERNEL_RCSID(0, "$NetBSD: linux_misc.c,v 1.234 2017/01/02 16:32:10 manu 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/file.h> 67#include <sys/file.h>
68#include <sys/stat.h> 68#include <sys/stat.h>
69#include <sys/filedesc.h> 69#include <sys/filedesc.h>
70#include <sys/ioctl.h> 70#include <sys/ioctl.h>
71#include <sys/kernel.h> 71#include <sys/kernel.h>
72#include <sys/malloc.h> 72#include <sys/malloc.h>
73#include <sys/mbuf.h> 73#include <sys/mbuf.h>
@@ -915,26 +915,107 @@ linux_select1(struct lwp *l, register_t  @@ -915,26 +915,107 @@ linux_select1(struct lwp *l, register_t
915 if (uts.tv_sec < 0) 915 if (uts.tv_sec < 0)
916 timespecclear(&uts); 916 timespecclear(&uts);
917 } else 917 } else
918 timespecclear(&uts); 918 timespecclear(&uts);
919 ltv.tv_sec = uts.tv_sec; 919 ltv.tv_sec = uts.tv_sec;
920 ltv.tv_usec = uts.tv_nsec / 1000; 920 ltv.tv_usec = uts.tv_nsec / 1000;
921 if ((error = copyout(&ltv, timeout, sizeof(ltv)))) 921 if ((error = copyout(&ltv, timeout, sizeof(ltv))))
922 return error; 922 return error;
923 } 923 }
924 924
925 return 0; 925 return 0;
926} 926}
927 927
 928/*
 929 * Derived from FreeBSD's sys/compat/linux/linux_misc.c:linux_pselect6()
 930 * which was contributed by Dmitry Chagin
 931 * https://svnweb.freebsd.org/base?view=revision&revision=283403
 932 */
 933int
 934linux_sys_pselect6(struct lwp *l,
 935 const struct linux_sys_pselect6_args *uap, register_t *retval)
 936{
 937 /* {
 938 syscallarg(int) nfds;
 939 syscallarg(fd_set *) readfds;
 940 syscallarg(fd_set *) writefds;
 941 syscallarg(fd_set *) exceptfds;
 942 syscallarg(struct timespec *) timeout;
 943 syscallarg(linux_sized_sigset_t *) ss;
 944 } */
 945 struct timespec uts, ts0, ts1, *tsp;
 946 linux_sized_sigset_t lsss;
 947 struct linux_timespec lts;
 948 linux_sigset_t lss;
 949 sigset_t *ssp;
 950 sigset_t ss;
 951 int error;
 952
 953 ssp = NULL;
 954 if (SCARG(uap, ss) != NULL) {
 955 if ((error = copyin(SCARG(uap, ss), &lsss, sizeof(lsss))) != 0)
 956 return (error);
 957 if (lsss.ss_len != sizeof(lss))
 958 return (EINVAL);
 959 if (lsss.ss != NULL) {
 960 if ((error = copyin(lsss.ss, &lss, sizeof(lss))) != 0)
 961 return (error);
 962 linux_to_native_sigset(&ss, &lss);
 963 ssp = &ss;
 964 }
 965 }
 966
 967 if (SCARG(uap, timeout) != NULL) {
 968 error = copyin(SCARG(uap, timeout), &lts, sizeof(lts));
 969 if (error != 0)
 970 return (error);
 971 linux_to_native_timespec(&uts, &lts);
 972
 973 if (itimespecfix(&uts))
 974 return (EINVAL);
 975
 976 nanotime(&ts0);
 977 tsp = &uts;
 978 } else {
 979 tsp = NULL;
 980 }
 981
 982 error = selcommon(retval, SCARG(uap, nfds), SCARG(uap, readfds),
 983 SCARG(uap, writefds), SCARG(uap, exceptfds), tsp, ssp);
 984
 985 if (error == 0 && tsp != NULL) {
 986 if (retval != 0) {
 987 /*
 988 * Compute how much time was left of the timeout,
 989 * by subtracting the current time and the time
 990 * before we started the call, and subtracting
 991 * that result from the user-supplied value.
 992 */
 993 nanotime(&ts1);
 994 timespecsub(&ts1, &ts0, &ts1);
 995 timespecsub(&uts, &ts1, &uts);
 996 if (uts.tv_sec < 0)
 997 timespecclear(&uts);
 998 } else {
 999 timespecclear(&uts);
 1000 }
 1001
 1002 native_to_linux_timespec(&lts, &uts);
 1003 error = copyout(&lts, SCARG(uap, timeout), sizeof(lts));
 1004 }
 1005
 1006 return (error);
 1007}
 1008
928int 1009int
929linux_sys_ppoll(struct lwp *l, 1010linux_sys_ppoll(struct lwp *l,
930 const struct linux_sys_ppoll_args *uap, register_t *retval) 1011 const struct linux_sys_ppoll_args *uap, register_t *retval)
931{ 1012{
932 /* { 1013 /* {
933 syscallarg(struct pollfd *) fds; 1014 syscallarg(struct pollfd *) fds;
934 syscallarg(u_int) nfds; 1015 syscallarg(u_int) nfds;
935 syscallarg(struct linux_timespec *) timeout; 1016 syscallarg(struct linux_timespec *) timeout;
936 syscallarg(linux_sigset_t *) sigset; 1017 syscallarg(linux_sigset_t *) sigset;
937 } */ 1018 } */
938 struct linux_timespec lts0, *lts; 1019 struct linux_timespec lts0, *lts;
939 struct timespec ts0, *ts = NULL; 1020 struct timespec ts0, *ts = NULL;
940 linux_sigset_t lsigmask0, *lsigmask; 1021 linux_sigset_t lsigmask0, *lsigmask;

cvs diff -r1.30 -r1.31 src/sys/compat/linux/common/linux_signal.h (expand / switch to unified diff)

--- src/sys/compat/linux/common/linux_signal.h 2009/05/29 14:19:13 1.30
+++ src/sys/compat/linux/common/linux_signal.h 2017/01/02 16:32:10 1.31
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: linux_signal.h,v 1.30 2009/05/29 14:19:13 njoly Exp $ */ 1/* $NetBSD: linux_signal.h,v 1.31 2017/01/02 16:32:10 manu Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 1995, 1998 The NetBSD Foundation, Inc. 4 * Copyright (c) 1995, 1998 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.
@@ -38,26 +38,31 @@ @@ -38,26 +38,31 @@
38#include <compat/linux/arch/m68k/linux_signal.h> 38#include <compat/linux/arch/m68k/linux_signal.h>
39#elif defined(__alpha__) 39#elif defined(__alpha__)
40#include <compat/linux/arch/alpha/linux_signal.h> 40#include <compat/linux/arch/alpha/linux_signal.h>
41#elif defined(__powerpc__) 41#elif defined(__powerpc__)
42#include <compat/linux/arch/powerpc/linux_signal.h> 42#include <compat/linux/arch/powerpc/linux_signal.h>
43#elif defined(__mips__) 43#elif defined(__mips__)
44#include <compat/linux/arch/mips/linux_signal.h> 44#include <compat/linux/arch/mips/linux_signal.h>
45#elif defined(__arm__) 45#elif defined(__arm__)
46#include <compat/linux/arch/arm/linux_signal.h> 46#include <compat/linux/arch/arm/linux_signal.h>
47#elif defined(__amd64__) 47#elif defined(__amd64__)
48#include <compat/linux/arch/amd64/linux_signal.h> 48#include <compat/linux/arch/amd64/linux_signal.h>
49#endif 49#endif
50 50
 51typedef struct {
 52 linux_sigset_t *ss;
 53 size_t ss_len;
 54} linux_sized_sigset_t;
 55
51#ifdef _KERNEL 56#ifdef _KERNEL
52extern const int native_to_linux_signo[]; 57extern const int native_to_linux_signo[];
53extern const int linux_to_native_signo[]; 58extern const int linux_to_native_signo[];
54__BEGIN_DECLS 59__BEGIN_DECLS
55int linux_sigprocmask1(struct lwp *, int, const linux_old_sigset_t *, 60int linux_sigprocmask1(struct lwp *, int, const linux_old_sigset_t *,
56 linux_old_sigset_t *); 61 linux_old_sigset_t *);
57 62
58#if LINUX__NSIG_WORDS > 1 63#if LINUX__NSIG_WORDS > 1
59void linux_old_extra_to_native_sigset(sigset_t *, 64void linux_old_extra_to_native_sigset(sigset_t *,
60 const linux_old_sigset_t *, const unsigned long *); 65 const linux_old_sigset_t *, const unsigned long *);
61void native_to_linux_old_extra_sigset(linux_old_sigset_t *, 66void native_to_linux_old_extra_sigset(linux_old_sigset_t *,
62 unsigned long *, const sigset_t *); 67 unsigned long *, const sigset_t *);
63#define linux_old_to_native_sigset(x,y) \ 68#define linux_old_to_native_sigset(x,y) \