From owner-svn-src-head@freebsd.org Wed Jun 22 21:18:22 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 36DB2B72622; Wed, 22 Jun 2016 21:18:22 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 012051158; Wed, 22 Jun 2016 21:18:21 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u5MLILgX093761; Wed, 22 Jun 2016 21:18:21 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5MLIJjQ093748; Wed, 22 Jun 2016 21:18:19 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201606222118.u5MLIJjQ093748@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Wed, 22 Jun 2016 21:18:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302095 - in head/sys: compat/freebsd32 kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Jun 2016 21:18:22 -0000 Author: brooks Date: Wed Jun 22 21:18:19 2016 New Revision: 302095 URL: https://svnweb.freebsd.org/changeset/base/302095 Log: Generate syscall tables and update pipe() implementation after r302094. Mark the pipe() system call as COMPAT10. As of r302092 libc uses pipe2() with a zero flags value instead of pipe(). Approved by: re (gjb) Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D6816 Modified: head/sys/compat/freebsd32/freebsd32_misc.c head/sys/compat/freebsd32/freebsd32_proto.h head/sys/compat/freebsd32/freebsd32_syscall.h head/sys/compat/freebsd32/freebsd32_syscalls.c head/sys/compat/freebsd32/freebsd32_sysent.c head/sys/compat/freebsd32/freebsd32_systrace_args.c head/sys/kern/init_sysent.c head/sys/kern/sys_pipe.c head/sys/kern/syscalls.c head/sys/kern/systrace_args.c head/sys/sys/syscall.h head/sys/sys/syscall.mk head/sys/sys/sysproto.h Modified: head/sys/compat/freebsd32/freebsd32_misc.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_misc.c Wed Jun 22 21:15:59 2016 (r302094) +++ head/sys/compat/freebsd32/freebsd32_misc.c Wed Jun 22 21:18:19 2016 (r302095) @@ -272,6 +272,15 @@ freebsd4_freebsd32_getfsstat(struct thre } #endif +#ifdef COMPAT_FREEBSD10 +int +freebsd10_freebsd32_pipe(struct thread *td, + struct freebsd10_freebsd32_pipe_args *uap) { + + return (freebsd10_pipe(td, (struct freebsd10_pipe_args*)uap)); +} +#endif + int freebsd32_sigaltstack(struct thread *td, struct freebsd32_sigaltstack_args *uap) Modified: head/sys/compat/freebsd32/freebsd32_proto.h ============================================================================== --- head/sys/compat/freebsd32/freebsd32_proto.h Wed Jun 22 21:15:59 2016 (r302094) +++ head/sys/compat/freebsd32/freebsd32_proto.h Wed Jun 22 21:18:19 2016 (r302095) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 296572 2016-03-09 19:05:11Z jhb + * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 302094 2016-06-22 21:15:59Z brooks */ #ifndef _FREEBSD32_SYSPROTO_H_ @@ -61,6 +61,9 @@ struct freebsd32_recvfrom_args { char from_l_[PADL_(uint32_t)]; uint32_t from; char from_r_[PADR_(uint32_t)]; char fromlenaddr_l_[PADL_(uint32_t)]; uint32_t fromlenaddr; char fromlenaddr_r_[PADR_(uint32_t)]; }; +struct freebsd10_freebsd32_pipe_args { + register_t dummy; +}; struct ofreebsd32_sigpending_args { register_t dummy; }; @@ -1099,6 +1102,28 @@ int freebsd7_freebsd32_shmctl(struct thr #endif /* COMPAT_FREEBSD7 */ + +#ifdef COMPAT_FREEBSD10 + +#if !defined(PAD64_REQUIRED) && (defined(__powerpc__) || defined(__mips__)) +#define PAD64_REQUIRED +#endif +#ifdef PAD64_REQUIRED +#else +#endif +#ifdef PAD64_REQUIRED +#else +#endif +#ifdef PAD64_REQUIRED +#else +#endif +#ifdef PAD64_REQUIRED +#else +#endif +int freebsd10_freebsd32_pipe(struct thread *, struct freebsd10_freebsd32_pipe_args *); + +#endif /* COMPAT_FREEBSD10 */ + #define FREEBSD32_SYS_AUE_freebsd32_wait4 AUE_WAIT4 #define FREEBSD32_SYS_AUE_freebsd4_freebsd32_getfsstat AUE_GETFSSTAT #define FREEBSD32_SYS_AUE_ofreebsd32_lseek AUE_LSEEK @@ -1107,6 +1132,7 @@ int freebsd7_freebsd32_shmctl(struct thr #define FREEBSD32_SYS_AUE_freebsd32_recvfrom AUE_RECVFROM #define FREEBSD32_SYS_AUE_ofreebsd32_stat AUE_STAT #define FREEBSD32_SYS_AUE_ofreebsd32_lstat AUE_LSTAT +#define FREEBSD32_SYS_AUE_freebsd10_freebsd32_pipe AUE_PIPE #define FREEBSD32_SYS_AUE_ofreebsd32_sigaction AUE_SIGACTION #define FREEBSD32_SYS_AUE_ofreebsd32_sigprocmask AUE_SIGPROCMASK #define FREEBSD32_SYS_AUE_ofreebsd32_sigpending AUE_SIGPENDING Modified: head/sys/compat/freebsd32/freebsd32_syscall.h ============================================================================== --- head/sys/compat/freebsd32/freebsd32_syscall.h Wed Jun 22 21:15:59 2016 (r302094) +++ head/sys/compat/freebsd32/freebsd32_syscall.h Wed Jun 22 21:18:19 2016 (r302095) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 296572 2016-03-09 19:05:11Z jhb + * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 302094 2016-06-22 21:15:59Z brooks */ #define FREEBSD32_SYS_syscall 0 @@ -48,7 +48,7 @@ #define FREEBSD32_SYS_getppid 39 /* 40 is old freebsd32_lstat */ #define FREEBSD32_SYS_dup 41 -#define FREEBSD32_SYS_pipe 42 + /* 42 is freebsd10 freebsd32_pipe */ #define FREEBSD32_SYS_getegid 43 #define FREEBSD32_SYS_profil 44 #define FREEBSD32_SYS_ktrace 45 Modified: head/sys/compat/freebsd32/freebsd32_syscalls.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_syscalls.c Wed Jun 22 21:15:59 2016 (r302094) +++ head/sys/compat/freebsd32/freebsd32_syscalls.c Wed Jun 22 21:18:19 2016 (r302095) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 296572 2016-03-09 19:05:11Z jhb + * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 302094 2016-06-22 21:15:59Z brooks */ const char *freebsd32_syscallnames[] = { @@ -52,7 +52,7 @@ const char *freebsd32_syscallnames[] = { "getppid", /* 39 = getppid */ "compat.freebsd32_lstat", /* 40 = old freebsd32_lstat */ "dup", /* 41 = dup */ - "pipe", /* 42 = pipe */ + "compat10.freebsd32_pipe", /* 42 = freebsd10 freebsd32_pipe */ "getegid", /* 43 = getegid */ "profil", /* 44 = profil */ "ktrace", /* 45 = ktrace */ Modified: head/sys/compat/freebsd32/freebsd32_sysent.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_sysent.c Wed Jun 22 21:15:59 2016 (r302094) +++ head/sys/compat/freebsd32/freebsd32_sysent.c Wed Jun 22 21:18:19 2016 (r302095) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 296572 2016-03-09 19:05:11Z jhb + * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 302094 2016-06-22 21:15:59Z brooks */ #include "opt_compat.h" @@ -42,6 +42,12 @@ #define compat7(n, name) 0, (sy_call_t *)nosys #endif +#ifdef COMPAT_FREEBSD10 +#define compat10(n, name) n, (sy_call_t *)__CONCAT(freebsd10_,name) +#else +#define compat10(n, name) 0, (sy_call_t *)nosys +#endif + /* The casts are bogus but will do for now. */ struct sysent freebsd32_sysent[] = { #if !defined(PAD64_REQUIRED) && (defined(__powerpc__) || defined(__mips__)) @@ -89,7 +95,7 @@ struct sysent freebsd32_sysent[] = { { 0, (sy_call_t *)sys_getppid, AUE_GETPPID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 39 = getppid */ { compat(AS(ofreebsd32_lstat_args),freebsd32_lstat), AUE_LSTAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 40 = old freebsd32_lstat */ { AS(dup_args), (sy_call_t *)sys_dup, AUE_DUP, NULL, 0, 0, 0, SY_THR_STATIC }, /* 41 = dup */ - { 0, (sy_call_t *)sys_pipe, AUE_PIPE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 42 = pipe */ + { compat10(0,freebsd32_pipe), AUE_PIPE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 42 = freebsd10 freebsd32_pipe */ { 0, (sy_call_t *)sys_getegid, AUE_GETEGID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 43 = getegid */ { AS(profil_args), (sy_call_t *)sys_profil, AUE_PROFILE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 44 = profil */ { AS(ktrace_args), (sy_call_t *)sys_ktrace, AUE_KTRACE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 45 = ktrace */ Modified: head/sys/compat/freebsd32/freebsd32_systrace_args.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_systrace_args.c Wed Jun 22 21:15:59 2016 (r302094) +++ head/sys/compat/freebsd32/freebsd32_systrace_args.c Wed Jun 22 21:18:19 2016 (r302095) @@ -293,11 +293,6 @@ systrace_args(int sysnum, void *params, *n_args = 1; break; } - /* pipe */ - case 42: { - *n_args = 0; - break; - } /* getegid */ case 43: { *n_args = 0; @@ -3768,9 +3763,6 @@ systrace_entry_setargdesc(int sysnum, in break; }; break; - /* pipe */ - case 42: - break; /* getegid */ case 43: break; @@ -9083,8 +9075,6 @@ systrace_return_setargdesc(int sysnum, i if (ndx == 0 || ndx == 1) p = "int"; break; - /* pipe */ - case 42: /* getegid */ case 43: /* profil */ Modified: head/sys/kern/init_sysent.c ============================================================================== --- head/sys/kern/init_sysent.c Wed Jun 22 21:15:59 2016 (r302094) +++ head/sys/kern/init_sysent.c Wed Jun 22 21:18:19 2016 (r302095) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/kern/syscalls.master 297167 2016-03-21 21:37:33Z jhb + * created from FreeBSD: head/sys/kern/syscalls.master 302094 2016-06-22 21:15:59Z brooks */ #include "opt_compat.h" @@ -38,6 +38,12 @@ #define compat7(n, name) 0, (sy_call_t *)nosys #endif +#ifdef COMPAT_FREEBSD10 +#define compat10(n, name) n, (sy_call_t *)__CONCAT(freebsd10_,name) +#else +#define compat10(n, name) 0, (sy_call_t *)nosys +#endif + /* The casts are bogus but will do for now. */ struct sysent sysent[] = { { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 0 = syscall */ @@ -82,7 +88,7 @@ struct sysent sysent[] = { { 0, (sy_call_t *)sys_getppid, AUE_GETPPID, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 39 = getppid */ { compat(AS(olstat_args),lstat), AUE_LSTAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 40 = old lstat */ { AS(dup_args), (sy_call_t *)sys_dup, AUE_DUP, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 41 = dup */ - { 0, (sy_call_t *)sys_pipe, AUE_PIPE, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 42 = pipe */ + { compat10(0,pipe), AUE_PIPE, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 42 = freebsd10 pipe */ { 0, (sy_call_t *)sys_getegid, AUE_GETEGID, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 43 = getegid */ { AS(profil_args), (sy_call_t *)sys_profil, AUE_PROFILE, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 44 = profil */ { AS(ktrace_args), (sy_call_t *)sys_ktrace, AUE_KTRACE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 45 = ktrace */ Modified: head/sys/kern/sys_pipe.c ============================================================================== --- head/sys/kern/sys_pipe.c Wed Jun 22 21:15:59 2016 (r302094) +++ head/sys/kern/sys_pipe.c Wed Jun 22 21:18:19 2016 (r302095) @@ -89,6 +89,8 @@ * in the structure may have changed. */ +#include "opt_compat.h" + #include __FBSDID("$FreeBSD$"); @@ -445,9 +447,10 @@ kern_pipe(struct thread *td, int fildes[ return (0); } +#ifdef COMPAT_FREEBSD10 /* ARGSUSED */ int -sys_pipe(struct thread *td, struct pipe_args *uap) +freebsd10_pipe(struct thread *td, struct freebsd10_pipe_args *uap __unused) { int error; int fildes[2]; @@ -461,6 +464,7 @@ sys_pipe(struct thread *td, struct pipe_ return (0); } +#endif int sys_pipe2(struct thread *td, struct pipe2_args *uap) Modified: head/sys/kern/syscalls.c ============================================================================== --- head/sys/kern/syscalls.c Wed Jun 22 21:15:59 2016 (r302094) +++ head/sys/kern/syscalls.c Wed Jun 22 21:18:19 2016 (r302095) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/kern/syscalls.master 297167 2016-03-21 21:37:33Z jhb + * created from FreeBSD: head/sys/kern/syscalls.master 302094 2016-06-22 21:15:59Z brooks */ const char *syscallnames[] = { @@ -49,7 +49,7 @@ const char *syscallnames[] = { "getppid", /* 39 = getppid */ "compat.lstat", /* 40 = old lstat */ "dup", /* 41 = dup */ - "pipe", /* 42 = pipe */ + "compat10.pipe", /* 42 = freebsd10 pipe */ "getegid", /* 43 = getegid */ "profil", /* 44 = profil */ "ktrace", /* 45 = ktrace */ Modified: head/sys/kern/systrace_args.c ============================================================================== --- head/sys/kern/systrace_args.c Wed Jun 22 21:15:59 2016 (r302094) +++ head/sys/kern/systrace_args.c Wed Jun 22 21:18:19 2016 (r302095) @@ -290,11 +290,6 @@ systrace_args(int sysnum, void *params, *n_args = 1; break; } - /* pipe */ - case 42: { - *n_args = 0; - break; - } /* getegid */ case 43: { *n_args = 0; @@ -3775,9 +3770,6 @@ systrace_entry_setargdesc(int sysnum, in break; }; break; - /* pipe */ - case 42: - break; /* getegid */ case 43: break; @@ -9040,8 +9032,6 @@ systrace_return_setargdesc(int sysnum, i if (ndx == 0 || ndx == 1) p = "int"; break; - /* pipe */ - case 42: /* getegid */ case 43: /* profil */ Modified: head/sys/sys/syscall.h ============================================================================== --- head/sys/sys/syscall.h Wed Jun 22 21:15:59 2016 (r302094) +++ head/sys/sys/syscall.h Wed Jun 22 21:18:19 2016 (r302095) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/kern/syscalls.master 297167 2016-03-21 21:37:33Z jhb + * created from FreeBSD: head/sys/kern/syscalls.master 302094 2016-06-22 21:15:59Z brooks */ #define SYS_syscall 0 @@ -48,7 +48,7 @@ #define SYS_getppid 39 /* 40 is old lstat */ #define SYS_dup 41 -#define SYS_pipe 42 + /* 42 is freebsd10 pipe */ #define SYS_getegid 43 #define SYS_profil 44 #define SYS_ktrace 45 Modified: head/sys/sys/syscall.mk ============================================================================== --- head/sys/sys/syscall.mk Wed Jun 22 21:15:59 2016 (r302094) +++ head/sys/sys/syscall.mk Wed Jun 22 21:18:19 2016 (r302095) @@ -1,7 +1,7 @@ # FreeBSD system call object files. # DO NOT EDIT-- this file is automatically generated. # $FreeBSD$ -# created from FreeBSD: head/sys/kern/syscalls.master 297167 2016-03-21 21:37:33Z jhb +# created from FreeBSD: head/sys/kern/syscalls.master 302094 2016-06-22 21:15:59Z brooks MIASM = \ syscall.o \ exit.o \ @@ -39,7 +39,6 @@ MIASM = \ kill.o \ getppid.o \ dup.o \ - pipe.o \ getegid.o \ profil.o \ ktrace.o \ Modified: head/sys/sys/sysproto.h ============================================================================== --- head/sys/sys/sysproto.h Wed Jun 22 21:15:59 2016 (r302094) +++ head/sys/sys/sysproto.h Wed Jun 22 21:18:19 2016 (r302095) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/kern/syscalls.master 297167 2016-03-21 21:37:33Z jhb + * created from FreeBSD: head/sys/kern/syscalls.master 302094 2016-06-22 21:15:59Z brooks */ #ifndef _SYS_SYSPROTO_H_ @@ -183,7 +183,7 @@ struct getppid_args { struct dup_args { char fd_l_[PADL_(u_int)]; u_int fd; char fd_r_[PADR_(u_int)]; }; -struct pipe_args { +struct freebsd10_pipe_args { register_t dummy; }; struct getegid_args { @@ -1824,7 +1824,6 @@ int sys_sync(struct thread *, struct syn int sys_kill(struct thread *, struct kill_args *); int sys_getppid(struct thread *, struct getppid_args *); int sys_dup(struct thread *, struct dup_args *); -int sys_pipe(struct thread *, struct pipe_args *); int sys_getegid(struct thread *, struct getegid_args *); int sys_profil(struct thread *, struct profil_args *); int sys_ktrace(struct thread *, struct ktrace_args *); @@ -2499,6 +2498,13 @@ int freebsd7_shmctl(struct thread *, str #endif /* COMPAT_FREEBSD7 */ + +#ifdef COMPAT_FREEBSD10 + +int freebsd10_pipe(struct thread *, struct freebsd10_pipe_args *); + +#endif /* COMPAT_FREEBSD10 */ + #define SYS_AUE_syscall AUE_NULL #define SYS_AUE_exit AUE_EXIT #define SYS_AUE_fork AUE_FORK @@ -2540,7 +2546,7 @@ int freebsd7_shmctl(struct thread *, str #define SYS_AUE_getppid AUE_GETPPID #define SYS_AUE_olstat AUE_LSTAT #define SYS_AUE_dup AUE_DUP -#define SYS_AUE_pipe AUE_PIPE +#define SYS_AUE_freebsd10_pipe AUE_PIPE #define SYS_AUE_getegid AUE_GETEGID #define SYS_AUE_profil AUE_PROFILE #define SYS_AUE_ktrace AUE_KTRACE