Mon Apr 17 05:19:09 2017 UTC ()
Pull up following revision(s) (requested by manu in ticket #1354):
	sys/compat/linux/arch/alpha/syscalls.master: revision 1.92 via patch
	sys/compat/linux/arch/amd64/syscalls.master: revision 1.58 via patch
	sys/compat/linux/arch/arm/syscalls.master: revision 1.65 via patch
	sys/compat/linux/arch/i386/syscalls.master: revision 1.122 via patch
	sys/compat/linux/arch/m68k/syscalls.master: revision 1.91 via patch
	sys/compat/linux/arch/mips/syscalls.master: revision 1.61 via patch
	sys/compat/linux/arch/powerpc/syscalls.master: revision 1.70 via patch
	sys/compat/linux/common/linux_misc.c: revision 1.234
	sys/compat/linux/common/linux_signal.h: revision 1.31
Add pselect6 Linux system call.
This lets Matlab R2016A run on NetBSD/amd64


(snj)
diff -r1.88 -r1.88.2.1 src/sys/compat/linux/arch/alpha/syscalls.master
diff -r1.52 -r1.52.2.1 src/sys/compat/linux/arch/amd64/syscalls.master
diff -r1.61 -r1.61.2.1 src/sys/compat/linux/arch/arm/syscalls.master
diff -r1.118 -r1.118.2.1 src/sys/compat/linux/arch/i386/syscalls.master
diff -r1.88 -r1.88.2.1 src/sys/compat/linux/arch/m68k/syscalls.master
diff -r1.56 -r1.56.2.1 src/sys/compat/linux/arch/mips/syscalls.master
diff -r1.65 -r1.65.2.1 src/sys/compat/linux/arch/powerpc/syscalls.master
diff -r1.229 -r1.229.2.1 src/sys/compat/linux/common/linux_misc.c
diff -r1.30 -r1.30.38.1 src/sys/compat/linux/common/linux_signal.h

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

--- src/sys/compat/linux/arch/alpha/syscalls.master 2014/05/29 10:35:26 1.88
+++ src/sys/compat/linux/arch/alpha/syscalls.master 2017/04/17 05:19:09 1.88.2.1
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1 $NetBSD: syscalls.master,v 1.88 2014/05/29 10:35:26 njoly Exp $ 1 $NetBSD: syscalls.master,v 1.88.2.1 2017/04/17 05:19:09 snj 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
@@ -718,27 +718,30 @@ @@ -718,27 +718,30 @@
718 int flag); } 718 int flag); }
719457 NOARGS { int|sys||renameat(int fromfd, const char *from, \ 719457 NOARGS { int|sys||renameat(int fromfd, const char *from, \
720 int tofd, const char *to); } 720 int tofd, const char *to); }
721458 STD { int|linux_sys||linkat(int fd1, const char *name1, \ 721458 STD { int|linux_sys||linkat(int fd1, const char *name1, \
722 int fd2, const char *name2, int flags); } 722 int fd2, const char *name2, int flags); }
723459 NOARGS { int|sys||symlinkat(const char *path1, int fd, \ 723459 NOARGS { int|sys||symlinkat(const char *path1, int fd, \
724 const char *path2); } 724 const char *path2); }
725460 NOARGS { int|sys||readlinkat(int fd, const char *path, \ 725460 NOARGS { int|sys||readlinkat(int fd, const char *path, \
726 char *buf, size_t bufsize); } 726 char *buf, size_t bufsize); }
727461 STD { int|linux_sys||fchmodat(int fd, const char *path, \ 727461 STD { int|linux_sys||fchmodat(int fd, const char *path, \
728 linux_umode_t mode); } 728 linux_umode_t mode); }
729462 STD { int|linux_sys||faccessat(int fd, const char *path, \ 729462 STD { int|linux_sys||faccessat(int fd, const char *path, \
730 int amode); } 730 int amode); }
731463 UNIMPL pselect6 731463 STD { int|linux_sys||pselect6(int nfds, fd_set *readfds, \
 732 fd_set *writefds, fd_set *exceptfds, \
 733 struct linux_timespec *timeout, \
 734 linux_sized_sigset_t *ss); }
732464 STD { int|linux_sys||ppoll(struct pollfd *fds, int nfds, \ 735464 STD { int|linux_sys||ppoll(struct pollfd *fds, int nfds, \
733 struct linux_timespec *timeout, \ 736 struct linux_timespec *timeout, \
734 linux_sigset_t *sigset); } 737 linux_sigset_t *sigset); }
735465 UNIMPL unshare 738465 UNIMPL unshare
736466 STD { int|linux_sys||set_robust_list( \ 739466 STD { int|linux_sys||set_robust_list( \
737 struct linux_robust_list_head *head, size_t len); } 740 struct linux_robust_list_head *head, size_t len); }
738467 STD { int|linux_sys||get_robust_list(int pid, \ 741467 STD { int|linux_sys||get_robust_list(int pid, \
739 struct linux_robust_list_head **head, \ 742 struct linux_robust_list_head **head, \
740 size_t *len); } 743 size_t *len); }
741468 UNIMPL splice 744468 UNIMPL splice
742469 UNIMPL sync_file_range 745469 UNIMPL sync_file_range
743470 UNIMPL tee 746470 UNIMPL tee
744471 UNIMPL vmsplice 747471 UNIMPL vmsplice

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

--- src/sys/compat/linux/arch/amd64/syscalls.master 2014/05/31 08:51:19 1.52
+++ src/sys/compat/linux/arch/amd64/syscalls.master 2017/04/17 05:19:09 1.52.2.1
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1 $NetBSD: syscalls.master,v 1.52 2014/05/31 08:51:19 njoly Exp $ 1 $NetBSD: syscalls.master,v 1.52.2.1 2017/04/17 05:19:09 snj 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 { int|sys||readlinkat(int fd, const char *path, \ 486267 NOARGS { int|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, int nfds, \ 496271 STD { int|linux_sys||ppoll(struct pollfd *fds, 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.61 -r1.61.2.1 src/sys/compat/linux/arch/arm/syscalls.master (expand / switch to unified diff)

--- src/sys/compat/linux/arch/arm/syscalls.master 2014/05/31 08:51:19 1.61
+++ src/sys/compat/linux/arch/arm/syscalls.master 2017/04/17 05:19:09 1.61.2.1
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1 $NetBSD: syscalls.master,v 1.61 2014/05/31 08:51:19 njoly Exp $ 1 $NetBSD: syscalls.master,v 1.61.2.1 2017/04/17 05:19:09 snj 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 { int|sys||readlinkat(int fd, const char *path, \ 527332 NOARGS { int|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, int nfds, \ 537336 STD { int|linux_sys||ppoll(struct pollfd *fds, 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.118 -r1.118.2.1 src/sys/compat/linux/arch/i386/syscalls.master (expand / switch to unified diff)

--- src/sys/compat/linux/arch/i386/syscalls.master 2014/05/31 08:51:19 1.118
+++ src/sys/compat/linux/arch/i386/syscalls.master 2017/04/17 05:19:09 1.118.2.1
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1 $NetBSD: syscalls.master,v 1.118 2014/05/31 08:51:19 njoly Exp $ 1 $NetBSD: syscalls.master,v 1.118.2.1 2017/04/17 05:19:09 snj 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 { int|sys||readlinkat(int fd, const char *path, \ 500305 NOARGS { int|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, int nfds, \ 510309 STD { int|linux_sys||ppoll(struct pollfd *fds, 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.88 -r1.88.2.1 src/sys/compat/linux/arch/m68k/syscalls.master (expand / switch to unified diff)

--- src/sys/compat/linux/arch/m68k/syscalls.master 2014/05/31 08:51:19 1.88
+++ src/sys/compat/linux/arch/m68k/syscalls.master 2017/04/17 05:19:09 1.88.2.1
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1 $NetBSD: syscalls.master,v 1.88 2014/05/31 08:51:19 njoly Exp $ 1 $NetBSD: syscalls.master,v 1.88.2.1 2017/04/17 05:19:09 snj 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 { int|sys||readlinkat(int fd, const char *path, \ 508298 NOARGS { int|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, int nfds, \ 518302 STD { int|linux_sys||ppoll(struct pollfd *fds, 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.56 -r1.56.2.1 src/sys/compat/linux/arch/mips/syscalls.master (expand / switch to unified diff)

--- src/sys/compat/linux/arch/mips/syscalls.master 2014/05/31 08:51:19 1.56
+++ src/sys/compat/linux/arch/mips/syscalls.master 2017/04/17 05:19:09 1.56.2.1
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1 $NetBSD: syscalls.master,v 1.56 2014/05/31 08:51:19 njoly Exp $  1 $NetBSD: syscalls.master,v 1.56.2.1 2017/04/17 05:19:09 snj 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;
@@ -490,27 +490,30 @@ @@ -490,27 +490,30 @@
490 int flag); } 490 int flag); }
491295 NOARGS { int|sys||renameat(int fromfd, const char *from, \ 491295 NOARGS { int|sys||renameat(int fromfd, const char *from, \
492 int tofd, const char *to); } 492 int tofd, const char *to); }
493296 STD { int|linux_sys||linkat(int fd1, const char *name1, \ 493296 STD { int|linux_sys||linkat(int fd1, const char *name1, \
494 int fd2, const char *name2, int flags); } 494 int fd2, const char *name2, int flags); }
495297 NOARGS { int|sys||symlinkat(const char *path1, int fd, \ 495297 NOARGS { int|sys||symlinkat(const char *path1, int fd, \
496 const char *path2); } 496 const char *path2); }
497298 NOARGS { int|sys||readlinkat(int fd, const char *path, \ 497298 NOARGS { int|sys||readlinkat(int fd, const char *path, \
498 char *buf, size_t bufsize); } 498 char *buf, size_t bufsize); }
499299 STD { int|linux_sys||fchmodat(int fd, const char *path, \ 499299 STD { int|linux_sys||fchmodat(int fd, const char *path, \
500 linux_umode_t mode); } 500 linux_umode_t mode); }
501300 STD { int|linux_sys||faccessat(int fd, const char *path, \ 501300 STD { int|linux_sys||faccessat(int fd, const char *path, \
502 int amode); } 502 int amode); }
503301 UNIMPL pselect6 503301 STD { int|linux_sys||pselect6(int nfds, fd_set *readfds, \
 504 fd_set *writefds, fd_set *exceptfds, \
 505 struct linux_timespec *timeout, \
 506 linux_sized_sigset_t *ss); }
504302 STD { int|linux_sys||ppoll(struct pollfd *fds, int nfds, \ 507302 STD { int|linux_sys||ppoll(struct pollfd *fds, int nfds, \
505 struct linux_timespec *timeout, \ 508 struct linux_timespec *timeout, \
506 linux_sigset_t *sigset); } 509 linux_sigset_t *sigset); }
507303 UNIMPL unshare 510303 UNIMPL unshare
508304 UNIMPL splice 511304 UNIMPL splice
509305 UNIMPL sync_file_range 512305 UNIMPL sync_file_range
510306 UNIMPL tee 513306 UNIMPL tee
511307 UNIMPL vmsplice 514307 UNIMPL vmsplice
512308 UNIMPL move_pages 515308 UNIMPL move_pages
513309 STD { int|linux_sys||set_robust_list( \ 516309 STD { int|linux_sys||set_robust_list( \
514 struct linux_robust_list_head *head, size_t len); } 517 struct linux_robust_list_head *head, size_t len); }
515310 STD { int|linux_sys||get_robust_list(int pid, \ 518310 STD { int|linux_sys||get_robust_list(int pid, \
516 struct linux_robust_list_head **head, \ 519 struct linux_robust_list_head **head, \

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

--- src/sys/compat/linux/arch/powerpc/syscalls.master 2014/05/31 08:51:19 1.65
+++ src/sys/compat/linux/arch/powerpc/syscalls.master 2017/04/17 05:19:09 1.65.2.1
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1 $NetBSD: syscalls.master,v 1.65 2014/05/31 08:51:19 njoly Exp $  1 $NetBSD: syscalls.master,v 1.65.2.1 2017/04/17 05:19:09 snj 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
@@ -467,27 +467,30 @@ @@ -467,27 +467,30 @@
467267 UNIMPL mq_getsetattr 467267 UNIMPL mq_getsetattr
468268 UNIMPL kexec_load 468268 UNIMPL kexec_load
469269 UNIMPL add_key 469269 UNIMPL add_key
470270 UNIMPL request_key 470270 UNIMPL request_key
471271 UNIMPL keyctl 471271 UNIMPL keyctl
472272 UNIMPL waitid 472272 UNIMPL waitid
473273 UNIMPL ioprio_set 473273 UNIMPL ioprio_set
474274 UNIMPL ioprio_get 474274 UNIMPL ioprio_get
475275 UNIMPL inotify_init 475275 UNIMPL inotify_init
476276 UNIMPL inotify_add_watch 476276 UNIMPL inotify_add_watch
477277 UNIMPL inotify_rm_watch 477277 UNIMPL inotify_rm_watch
478278 UNIMPL spu_run 478278 UNIMPL spu_run
479279 UNIMPL spu_create 479279 UNIMPL spu_create
480280 UNIMPL pselect6 480280 STD { int|linux_sys||pselect6(int nfds, fd_set *readfds, \
 481 fd_set *writefds, fd_set *exceptfds, \
 482 struct linux_timespec *timeout, \
 483 linux_sized_sigset_t *ss); }
481281 STD { int|linux_sys||ppoll(struct pollfd *fds, int nfds, \ 484281 STD { int|linux_sys||ppoll(struct pollfd *fds, int nfds, \
482 struct linux_timespec *timeout, \ 485 struct linux_timespec *timeout, \
483 linux_sigset_t *sigset); } 486 linux_sigset_t *sigset); }
484282 UNIMPL unshare 487282 UNIMPL unshare
485283 UNIMPL splice 488283 UNIMPL splice
486284 UNIMPL tee 489284 UNIMPL tee
487285 UNIMPL vmsplice 490285 UNIMPL vmsplice
488286 STD { int|linux_sys||openat(int fd, const char *path, \ 491286 STD { int|linux_sys||openat(int fd, const char *path, \
489 int flags, ... linux_umode_t mode); } 492 int flags, ... linux_umode_t mode); }
490287 NOARGS { int|sys||mkdirat(int fd, const char *path, \ 493287 NOARGS { int|sys||mkdirat(int fd, const char *path, \
491 linux_umode_t mode); } 494 linux_umode_t mode); }
492288 STD { int|linux_sys||mknodat(int fd, const char *path, \ 495288 STD { int|linux_sys||mknodat(int fd, const char *path, \
493 linux_umode_t mode, unsigned dev); } 496 linux_umode_t mode, unsigned dev); }

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

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

cvs diff -r1.30 -r1.30.38.1 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/04/17 05:19:09 1.30.38.1
@@ -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.30.38.1 2017/04/17 05:19:09 snj 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) \