From owner-freebsd-emulation@FreeBSD.ORG Wed Apr 16 16:57:13 2008 Return-Path: Delivered-To: freebsd-emulation@FreeBSD.org Received: from [127.0.0.1] (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by hub.freebsd.org (Postfix) with ESMTP id 396E0106566B for ; Wed, 16 Apr 2008 16:57:09 +0000 (UTC) (envelope-from jkim@FreeBSD.org) From: Jung-uk Kim To: freebsd-emulation@FreeBSD.org Date: Wed, 16 Apr 2008 12:56:50 -0400 User-Agent: KMail/1.6.2 MIME-Version: 1.0 Content-Disposition: inline Content-Type: Multipart/Mixed; boundary="Boundary-00=_Y/iBIhPmjHGUUF7" Message-Id: <200804161256.56633.jkim@FreeBSD.org> Cc: Subject: [PATCH] Add stubs for Linux 2.6.17 syscalls X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Apr 2008 16:57:13 -0000 --Boundary-00=_Y/iBIhPmjHGUUF7 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline The attached patch adds stubs for Linux 2.6.17 syscalls. Even though some syscalls were not in official 2.6.16 kernel (e.g., [gs]et_robust_list() showed up in 2.6.17-rc1), GNU libc started using them for NPTL and FC4 updated 2.6 kernel to 2.6.17 later. If you have any concern or objection, please speak up now. Thanks, Jung-uk Kim --Boundary-00=_Y/iBIhPmjHGUUF7 Content-Type: text/plain; charset="iso-8859-1"; name="dummy-linux-2.6.17.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="dummy-linux-2.6.17.diff" --- sys/amd64/linux32/linux32_dummy.c 8 Apr 2008 09:45:47 -0000 1.10 +++ sys/amd64/linux32/linux32_dummy.c 16 Apr 2008 16:27:16 -0000 @@ -99,6 +99,12 @@ DUMMY(pselect6); DUMMY(ppoll); DUMMY(unshare); +DUMMY(set_robust_list); +DUMMY(get_robust_list); +DUMMY(splice); +DUMMY(sync_file_range); +DUMMY(tee); +DUMMY(vmsplice); #define DUMMY_XATTR(s) \ int \ --- sys/amd64/linux32/linux32_proto.h 8 Apr 2008 09:51:19 -0000 1.35 +++ sys/amd64/linux32/linux32_proto.h 16 Apr 2008 16:27:18 -0000 @@ -968,6 +968,24 @@ struct linux_unshare_args { register_t dummy; }; +struct linux_set_robust_list_args { + register_t dummy; +}; +struct linux_get_robust_list_args { + register_t dummy; +}; +struct linux_splice_args { + register_t dummy; +}; +struct linux_sync_file_range_args { + register_t dummy; +}; +struct linux_tee_args { + register_t dummy; +}; +struct linux_vmsplice_args { + register_t dummy; +}; #define nosys linux_nosys int linux_fork(struct thread *, struct linux_fork_args *); int linux_open(struct thread *, struct linux_open_args *); @@ -1204,6 +1222,12 @@ int linux_pselect6(struct thread *, struct linux_pselect6_args *); int linux_ppoll(struct thread *, struct linux_ppoll_args *); int linux_unshare(struct thread *, struct linux_unshare_args *); +int linux_set_robust_list(struct thread *, struct linux_set_robust_list_args *); +int linux_get_robust_list(struct thread *, struct linux_get_robust_list_args *); +int linux_splice(struct thread *, struct linux_splice_args *); +int linux_sync_file_range(struct thread *, struct linux_sync_file_range_args *); +int linux_tee(struct thread *, struct linux_tee_args *); +int linux_vmsplice(struct thread *, struct linux_vmsplice_args *); #ifdef COMPAT_43 @@ -1460,6 +1484,12 @@ #define LINUX_SYS_AUE_linux_pselect6 AUE_NULL #define LINUX_SYS_AUE_linux_ppoll AUE_NULL #define LINUX_SYS_AUE_linux_unshare AUE_NULL +#define LINUX_SYS_AUE_linux_set_robust_list AUE_NULL +#define LINUX_SYS_AUE_linux_get_robust_list AUE_NULL +#define LINUX_SYS_AUE_linux_splice AUE_NULL +#define LINUX_SYS_AUE_linux_sync_file_range AUE_NULL +#define LINUX_SYS_AUE_linux_tee AUE_NULL +#define LINUX_SYS_AUE_linux_vmsplice AUE_NULL #undef PAD_ #undef PADL_ --- sys/amd64/linux32/linux32_syscall.h 8 Apr 2008 09:51:19 -0000 1.35 +++ sys/amd64/linux32/linux32_syscall.h 16 Apr 2008 16:27:18 -0000 @@ -283,4 +283,10 @@ #define LINUX_SYS_linux_pselect6 308 #define LINUX_SYS_linux_ppoll 309 #define LINUX_SYS_linux_unshare 310 -#define LINUX_SYS_MAXSYSCALL 311 +#define LINUX_SYS_linux_set_robust_list 311 +#define LINUX_SYS_linux_get_robust_list 312 +#define LINUX_SYS_linux_splice 313 +#define LINUX_SYS_linux_sync_file_range 314 +#define LINUX_SYS_linux_tee 315 +#define LINUX_SYS_linux_vmsplice 316 +#define LINUX_SYS_MAXSYSCALL 317 --- sys/amd64/linux32/linux32_sysent.c 8 Apr 2008 09:51:19 -0000 1.35 +++ sys/amd64/linux32/linux32_sysent.c 16 Apr 2008 16:27:18 -0000 @@ -330,4 +330,10 @@ { 0, (sy_call_t *)linux_pselect6, AUE_NULL, NULL, 0, 0 }, /* 308 = linux_pselect6 */ { 0, (sy_call_t *)linux_ppoll, AUE_NULL, NULL, 0, 0 }, /* 309 = linux_ppoll */ { 0, (sy_call_t *)linux_unshare, AUE_NULL, NULL, 0, 0 }, /* 310 = linux_unshare */ + { 0, (sy_call_t *)linux_set_robust_list, AUE_NULL, NULL, 0, 0 }, /* 311 = linux_set_robust_list */ + { 0, (sy_call_t *)linux_get_robust_list, AUE_NULL, NULL, 0, 0 }, /* 312 = linux_get_robust_list */ + { 0, (sy_call_t *)linux_splice, AUE_NULL, NULL, 0, 0 }, /* 313 = linux_splice */ + { 0, (sy_call_t *)linux_sync_file_range, AUE_NULL, NULL, 0, 0 }, /* 314 = linux_sync_file_range */ + { 0, (sy_call_t *)linux_tee, AUE_NULL, NULL, 0, 0 }, /* 315 = linux_tee */ + { 0, (sy_call_t *)linux_vmsplice, AUE_NULL, NULL, 0, 0 }, /* 316 = linux_vmsplice */ }; --- sys/amd64/linux32/syscalls.master 8 Apr 2008 09:45:47 -0000 1.32 +++ sys/amd64/linux32/syscalls.master 16 Apr 2008 16:27:19 -0000 @@ -493,3 +493,9 @@ 308 AUE_NULL STD { int linux_pselect6(void); } 309 AUE_NULL STD { int linux_ppoll(void); } 310 AUE_NULL STD { int linux_unshare(void); } +311 AUE_NULL STD { int linux_set_robust_list(void); } +312 AUE_NULL STD { int linux_get_robust_list(void); } +313 AUE_NULL STD { int linux_splice(void); } +314 AUE_NULL STD { int linux_sync_file_range(void); } +315 AUE_NULL STD { int linux_tee(void); } +316 AUE_NULL STD { int linux_vmsplice(void); } --- sys/i386/linux/linux_dummy.c 8 Apr 2008 09:45:48 -0000 1.47 +++ sys/i386/linux/linux_dummy.c 16 Apr 2008 16:27:19 -0000 @@ -90,6 +90,12 @@ DUMMY(pselect6); DUMMY(ppoll); DUMMY(unshare); +DUMMY(set_robust_list); +DUMMY(get_robust_list); +DUMMY(splice); +DUMMY(sync_file_range); +DUMMY(tee); +DUMMY(vmsplice); #define DUMMY_XATTR(s) \ int \ --- sys/i386/linux/linux_proto.h 8 Apr 2008 09:48:26 -0000 1.97 +++ sys/i386/linux/linux_proto.h 16 Apr 2008 16:27:20 -0000 @@ -987,6 +987,24 @@ struct linux_unshare_args { register_t dummy; }; +struct linux_set_robust_list_args { + register_t dummy; +}; +struct linux_get_robust_list_args { + register_t dummy; +}; +struct linux_splice_args { + register_t dummy; +}; +struct linux_sync_file_range_args { + register_t dummy; +}; +struct linux_tee_args { + register_t dummy; +}; +struct linux_vmsplice_args { + register_t dummy; +}; #define nosys linux_nosys int linux_fork(struct thread *, struct linux_fork_args *); int linux_open(struct thread *, struct linux_open_args *); @@ -1224,6 +1242,12 @@ int linux_pselect6(struct thread *, struct linux_pselect6_args *); int linux_ppoll(struct thread *, struct linux_ppoll_args *); int linux_unshare(struct thread *, struct linux_unshare_args *); +int linux_set_robust_list(struct thread *, struct linux_set_robust_list_args *); +int linux_get_robust_list(struct thread *, struct linux_get_robust_list_args *); +int linux_splice(struct thread *, struct linux_splice_args *); +int linux_sync_file_range(struct thread *, struct linux_sync_file_range_args *); +int linux_tee(struct thread *, struct linux_tee_args *); +int linux_vmsplice(struct thread *, struct linux_vmsplice_args *); #ifdef COMPAT_43 @@ -1481,6 +1505,12 @@ #define LINUX_SYS_AUE_linux_pselect6 AUE_NULL #define LINUX_SYS_AUE_linux_ppoll AUE_NULL #define LINUX_SYS_AUE_linux_unshare AUE_NULL +#define LINUX_SYS_AUE_linux_set_robust_list AUE_NULL +#define LINUX_SYS_AUE_linux_get_robust_list AUE_NULL +#define LINUX_SYS_AUE_linux_splice AUE_NULL +#define LINUX_SYS_AUE_linux_sync_file_range AUE_NULL +#define LINUX_SYS_AUE_linux_tee AUE_NULL +#define LINUX_SYS_AUE_linux_vmsplice AUE_NULL #undef PAD_ #undef PADL_ --- sys/i386/linux/linux_syscall.h 8 Apr 2008 09:48:26 -0000 1.89 +++ sys/i386/linux/linux_syscall.h 16 Apr 2008 16:27:20 -0000 @@ -290,4 +290,10 @@ #define LINUX_SYS_linux_pselect6 308 #define LINUX_SYS_linux_ppoll 309 #define LINUX_SYS_linux_unshare 310 -#define LINUX_SYS_MAXSYSCALL 311 +#define LINUX_SYS_linux_set_robust_list 311 +#define LINUX_SYS_linux_get_robust_list 312 +#define LINUX_SYS_linux_splice 313 +#define LINUX_SYS_linux_sync_file_range 314 +#define LINUX_SYS_linux_tee 315 +#define LINUX_SYS_linux_vmsplice 316 +#define LINUX_SYS_MAXSYSCALL 317 --- sys/i386/linux/linux_sysent.c 8 Apr 2008 09:48:26 -0000 1.96 +++ sys/i386/linux/linux_sysent.c 16 Apr 2008 16:27:20 -0000 @@ -329,4 +329,10 @@ { 0, (sy_call_t *)linux_pselect6, AUE_NULL, NULL, 0, 0 }, /* 308 = linux_pselect6 */ { 0, (sy_call_t *)linux_ppoll, AUE_NULL, NULL, 0, 0 }, /* 309 = linux_ppoll */ { 0, (sy_call_t *)linux_unshare, AUE_NULL, NULL, 0, 0 }, /* 310 = linux_unshare */ + { 0, (sy_call_t *)linux_set_robust_list, AUE_NULL, NULL, 0, 0 }, /* 311 = linux_set_robust_list */ + { 0, (sy_call_t *)linux_get_robust_list, AUE_NULL, NULL, 0, 0 }, /* 312 = linux_get_robust_list */ + { 0, (sy_call_t *)linux_splice, AUE_NULL, NULL, 0, 0 }, /* 313 = linux_splice */ + { 0, (sy_call_t *)linux_sync_file_range, AUE_NULL, NULL, 0, 0 }, /* 314 = linux_sync_file_range */ + { 0, (sy_call_t *)linux_tee, AUE_NULL, NULL, 0, 0 }, /* 315 = linux_tee */ + { 0, (sy_call_t *)linux_vmsplice, AUE_NULL, NULL, 0, 0 }, /* 316 = linux_vmsplice */ }; --- sys/i386/linux/syscalls.master 8 Apr 2008 09:45:48 -0000 1.91 +++ sys/i386/linux/syscalls.master 16 Apr 2008 16:27:21 -0000 @@ -503,3 +503,9 @@ 308 AUE_NULL STD { int linux_pselect6(void); } 309 AUE_NULL STD { int linux_ppoll(void); } 310 AUE_NULL STD { int linux_unshare(void); } +311 AUE_NULL STD { int linux_set_robust_list(void); } +312 AUE_NULL STD { int linux_get_robust_list(void); } +313 AUE_NULL STD { int linux_splice(void); } +314 AUE_NULL STD { int linux_sync_file_range(void); } +315 AUE_NULL STD { int linux_tee(void); } +316 AUE_NULL STD { int linux_vmsplice(void); } --Boundary-00=_Y/iBIhPmjHGUUF7--