From owner-svn-src-head@freebsd.org Thu Feb 20 16:59:01 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D4C5023F136; Thu, 20 Feb 2020 16:59:01 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Ngm4426Fz4dth; Thu, 20 Feb 2020 16:59:00 +0000 (UTC) (envelope-from mjg@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7B4CC24E61; Thu, 20 Feb 2020 16:59:00 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01KGx01w043094; Thu, 20 Feb 2020 16:59:00 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01KGwwSF043081; Thu, 20 Feb 2020 16:58:58 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202002201658.01KGwwSF043081@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Thu, 20 Feb 2020 16:58:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358173 - in head/sys: compat/freebsd32 kern sys X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: in head/sys: compat/freebsd32 kern sys X-SVN-Commit-Revision: 358173 X-SVN-Commit-Repository: base 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.29 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: Thu, 20 Feb 2020 16:59:01 -0000 Author: mjg Date: Thu Feb 20 16:58:57 2020 New Revision: 358173 URL: https://svnweb.freebsd.org/changeset/base/358173 Log: make sysent for r358172 ("vfs: add realpathat syscall") Modified: 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/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_syscall.h ============================================================================== --- head/sys/compat/freebsd32/freebsd32_syscall.h Thu Feb 20 16:58:19 2020 (r358172) +++ head/sys/compat/freebsd32/freebsd32_syscall.h Thu Feb 20 16:58:57 2020 (r358173) @@ -500,4 +500,5 @@ #define FREEBSD32_SYS_shm_open2 571 #define FREEBSD32_SYS_shm_rename 572 #define FREEBSD32_SYS_sigfastblock 573 -#define FREEBSD32_SYS_MAXSYSCALL 574 +#define FREEBSD32_SYS___realpathat 574 +#define FREEBSD32_SYS_MAXSYSCALL 575 Modified: head/sys/compat/freebsd32/freebsd32_syscalls.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_syscalls.c Thu Feb 20 16:58:19 2020 (r358172) +++ head/sys/compat/freebsd32/freebsd32_syscalls.c Thu Feb 20 16:58:57 2020 (r358173) @@ -610,4 +610,5 @@ const char *freebsd32_syscallnames[] = { "shm_open2", /* 571 = shm_open2 */ "shm_rename", /* 572 = shm_rename */ "sigfastblock", /* 573 = sigfastblock */ + "__realpathat", /* 574 = __realpathat */ }; Modified: head/sys/compat/freebsd32/freebsd32_sysent.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_sysent.c Thu Feb 20 16:58:19 2020 (r358172) +++ head/sys/compat/freebsd32/freebsd32_sysent.c Thu Feb 20 16:58:57 2020 (r358173) @@ -663,4 +663,5 @@ struct sysent freebsd32_sysent[] = { { AS(shm_open2_args), (sy_call_t *)sys_shm_open2, AUE_SHMOPEN, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 571 = shm_open2 */ { AS(shm_rename_args), (sy_call_t *)sys_shm_rename, AUE_SHMRENAME, NULL, 0, 0, 0, SY_THR_STATIC }, /* 572 = shm_rename */ { AS(sigfastblock_args), (sy_call_t *)sys_sigfastblock, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 573 = sigfastblock */ + { AS(__realpathat_args), (sy_call_t *)sys___realpathat, AUE_REALPATHAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 574 = __realpathat */ }; Modified: head/sys/compat/freebsd32/freebsd32_systrace_args.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_systrace_args.c Thu Feb 20 16:58:19 2020 (r358172) +++ head/sys/compat/freebsd32/freebsd32_systrace_args.c Thu Feb 20 16:58:57 2020 (r358173) @@ -3363,6 +3363,17 @@ systrace_args(int sysnum, void *params, uint64_t *uarg *n_args = 2; break; } + /* __realpathat */ + case 574: { + struct __realpathat_args *p = params; + iarg[0] = p->fd; /* int */ + uarg[1] = (intptr_t) p->path; /* const char * */ + uarg[2] = (intptr_t) p->buf; /* char * */ + uarg[3] = p->size; /* size_t */ + iarg[4] = p->flags; /* int */ + *n_args = 5; + break; + } default: *n_args = 0; break; @@ -9062,6 +9073,28 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d break; }; break; + /* __realpathat */ + case 574: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "userland const char *"; + break; + case 2: + p = "userland char *"; + break; + case 3: + p = "size_t"; + break; + case 4: + p = "int"; + break; + default: + break; + }; + break; default: break; }; @@ -10953,6 +10986,11 @@ systrace_return_setargdesc(int sysnum, int ndx, char * break; /* sigfastblock */ case 573: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* __realpathat */ + case 574: if (ndx == 0 || ndx == 1) p = "int"; break; Modified: head/sys/kern/init_sysent.c ============================================================================== --- head/sys/kern/init_sysent.c Thu Feb 20 16:58:19 2020 (r358172) +++ head/sys/kern/init_sysent.c Thu Feb 20 16:58:57 2020 (r358173) @@ -629,4 +629,5 @@ struct sysent sysent[] = { { AS(shm_open2_args), (sy_call_t *)sys_shm_open2, AUE_SHMOPEN, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 571 = shm_open2 */ { AS(shm_rename_args), (sy_call_t *)sys_shm_rename, AUE_SHMRENAME, NULL, 0, 0, 0, SY_THR_STATIC }, /* 572 = shm_rename */ { AS(sigfastblock_args), (sy_call_t *)sys_sigfastblock, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 573 = sigfastblock */ + { AS(__realpathat_args), (sy_call_t *)sys___realpathat, AUE_REALPATHAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 574 = __realpathat */ }; Modified: head/sys/kern/syscalls.c ============================================================================== --- head/sys/kern/syscalls.c Thu Feb 20 16:58:19 2020 (r358172) +++ head/sys/kern/syscalls.c Thu Feb 20 16:58:57 2020 (r358173) @@ -580,4 +580,5 @@ const char *syscallnames[] = { "shm_open2", /* 571 = shm_open2 */ "shm_rename", /* 572 = shm_rename */ "sigfastblock", /* 573 = sigfastblock */ + "__realpathat", /* 574 = __realpathat */ }; Modified: head/sys/kern/systrace_args.c ============================================================================== --- head/sys/kern/systrace_args.c Thu Feb 20 16:58:19 2020 (r358172) +++ head/sys/kern/systrace_args.c Thu Feb 20 16:58:57 2020 (r358173) @@ -3355,6 +3355,17 @@ systrace_args(int sysnum, void *params, uint64_t *uarg *n_args = 2; break; } + /* __realpathat */ + case 574: { + struct __realpathat_args *p = params; + iarg[0] = p->fd; /* int */ + uarg[1] = (intptr_t) p->path; /* const char * */ + uarg[2] = (intptr_t) p->buf; /* char * */ + uarg[3] = p->size; /* size_t */ + iarg[4] = p->flags; /* int */ + *n_args = 5; + break; + } default: *n_args = 0; break; @@ -8967,6 +8978,28 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d break; }; break; + /* __realpathat */ + case 574: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "userland const char *"; + break; + case 2: + p = "userland char *"; + break; + case 3: + p = "size_t"; + break; + case 4: + p = "int"; + break; + default: + break; + }; + break; default: break; }; @@ -10885,6 +10918,11 @@ systrace_return_setargdesc(int sysnum, int ndx, char * break; /* sigfastblock */ case 573: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* __realpathat */ + case 574: if (ndx == 0 || ndx == 1) p = "int"; break; Modified: head/sys/sys/syscall.h ============================================================================== --- head/sys/sys/syscall.h Thu Feb 20 16:58:19 2020 (r358172) +++ head/sys/sys/syscall.h Thu Feb 20 16:58:57 2020 (r358173) @@ -509,4 +509,5 @@ #define SYS_shm_open2 571 #define SYS_shm_rename 572 #define SYS_sigfastblock 573 -#define SYS_MAXSYSCALL 574 +#define SYS___realpathat 574 +#define SYS_MAXSYSCALL 575 Modified: head/sys/sys/syscall.mk ============================================================================== --- head/sys/sys/syscall.mk Thu Feb 20 16:58:19 2020 (r358172) +++ head/sys/sys/syscall.mk Thu Feb 20 16:58:57 2020 (r358173) @@ -414,4 +414,5 @@ MIASM = \ __sysctlbyname.o \ shm_open2.o \ shm_rename.o \ - sigfastblock.o + sigfastblock.o \ + __realpathat.o Modified: head/sys/sys/sysproto.h ============================================================================== --- head/sys/sys/sysproto.h Thu Feb 20 16:58:19 2020 (r358172) +++ head/sys/sys/sysproto.h Thu Feb 20 16:58:57 2020 (r358173) @@ -1823,6 +1823,13 @@ struct sigfastblock_args { char cmd_l_[PADL_(int)]; int cmd; char cmd_r_[PADR_(int)]; char ptr_l_[PADL_(uint32_t *)]; uint32_t * ptr; char ptr_r_[PADR_(uint32_t *)]; }; +struct __realpathat_args { + char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; + char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; + char buf_l_[PADL_(char *)]; char * buf; char buf_r_[PADR_(char *)]; + char size_l_[PADL_(size_t)]; size_t size; char size_r_[PADR_(size_t)]; + char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)]; +}; int nosys(struct thread *, struct nosys_args *); void sys_sys_exit(struct thread *, struct sys_exit_args *); int sys_fork(struct thread *, struct fork_args *); @@ -2212,6 +2219,7 @@ int sys___sysctlbyname(struct thread *, struct __sysct int sys_shm_open2(struct thread *, struct shm_open2_args *); int sys_shm_rename(struct thread *, struct shm_rename_args *); int sys_sigfastblock(struct thread *, struct sigfastblock_args *); +int sys___realpathat(struct thread *, struct __realpathat_args *); #ifdef COMPAT_43 @@ -3136,6 +3144,7 @@ int freebsd12_shm_open(struct thread *, struct freebsd #define SYS_AUE_shm_open2 AUE_SHMOPEN #define SYS_AUE_shm_rename AUE_SHMRENAME #define SYS_AUE_sigfastblock AUE_NULL +#define SYS_AUE___realpathat AUE_REALPATHAT #undef PAD_ #undef PADL_