Author: kevans
Date: Wed Sep 25 18:09:19 2019
New Revision: 352706
URL: https://svnweb.freebsd.org/changeset/base/352706

Log:
  sysent: regenerate after r352705
  
  This also implements it, fixes kdump, and removes no longer needed bits from
  lib/libc/sys/shm_open.c for the interim.

Modified:
  head/lib/libc/sys/shm_open.c
  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/kern/uipc_shm.c
  head/sys/sys/syscall.h
  head/sys/sys/syscall.mk
  head/sys/sys/sysproto.h
  head/usr.bin/kdump/kdump.c

Modified: head/lib/libc/sys/shm_open.c
==============================================================================
--- head/lib/libc/sys/shm_open.c        Wed Sep 25 18:06:48 2019        
(r352705)
+++ head/lib/libc/sys/shm_open.c        Wed Sep 25 18:09:19 2019        
(r352706)
@@ -46,10 +46,6 @@ __FBSDID("$FreeBSD$");
 __weak_reference(shm_open, _shm_open);
 __weak_reference(shm_open, __sys_shm_open);
 
-#ifndef SYS_freebsd12_shm_open
-#define        SYS_freebsd12_shm_open  SYS_shm_open
-#endif
-
 #define        SHM_OPEN2_OSREL         1300048
 
 #define        MEMFD_NAME_PREFIX       "memfd:"

Modified: head/sys/compat/freebsd32/freebsd32_syscall.h
==============================================================================
--- head/sys/compat/freebsd32/freebsd32_syscall.h       Wed Sep 25 18:06:48 
2019        (r352705)
+++ head/sys/compat/freebsd32/freebsd32_syscall.h       Wed Sep 25 18:09:19 
2019        (r352706)
@@ -404,7 +404,7 @@
 #define        FREEBSD32_SYS_freebsd32_truncate        479
 #define        FREEBSD32_SYS_freebsd32_ftruncate       480
 #define        FREEBSD32_SYS_thr_kill2 481
-#define        FREEBSD32_SYS_shm_open  482
+#define        FREEBSD32_SYS_freebsd12_shm_open        482
 #define        FREEBSD32_SYS_shm_unlink        483
 #define        FREEBSD32_SYS_cpuset    484
 #define        FREEBSD32_SYS_freebsd32_cpuset_setid    485

Modified: head/sys/compat/freebsd32/freebsd32_syscalls.c
==============================================================================
--- head/sys/compat/freebsd32/freebsd32_syscalls.c      Wed Sep 25 18:06:48 
2019        (r352705)
+++ head/sys/compat/freebsd32/freebsd32_syscalls.c      Wed Sep 25 18:09:19 
2019        (r352706)
@@ -500,7 +500,7 @@ const char *freebsd32_syscallnames[] = {
        "freebsd32_ftruncate",                  /* 480 = freebsd32_ftruncate */
 #endif
        "thr_kill2",                    /* 481 = thr_kill2 */
-       "shm_open",                     /* 482 = shm_open */
+       "compat12.shm_open",            /* 482 = freebsd12 shm_open */
        "shm_unlink",                   /* 483 = shm_unlink */
        "cpuset",                       /* 484 = cpuset */
 #ifdef PAD64_REQUIRED

Modified: head/sys/compat/freebsd32/freebsd32_sysent.c
==============================================================================
--- head/sys/compat/freebsd32/freebsd32_sysent.c        Wed Sep 25 18:06:48 
2019        (r352705)
+++ head/sys/compat/freebsd32/freebsd32_sysent.c        Wed Sep 25 18:09:19 
2019        (r352706)
@@ -51,6 +51,12 @@
 #define compat11(n, name) 0, (sy_call_t *)nosys
 #endif
 
+#ifdef COMPAT_FREEBSD12
+#define compat12(n, name) n, (sy_call_t *)__CONCAT(freebsd12_,name)
+#else
+#define compat12(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(__amd64__)
@@ -547,7 +553,7 @@ struct sysent freebsd32_sysent[] = {
        { AS(freebsd32_ftruncate_args), (sy_call_t *)freebsd32_ftruncate, 
AUE_FTRUNCATE, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },   /* 480 = 
freebsd32_ftruncate */
 #endif
        { AS(thr_kill2_args), (sy_call_t *)sys_thr_kill2, AUE_THR_KILL2, NULL, 
0, 0, 0, SY_THR_STATIC },        /* 481 = thr_kill2 */
-       { AS(shm_open_args), (sy_call_t *)sys_shm_open, AUE_SHMOPEN, NULL, 0, 
0, SYF_CAPENABLED, SY_THR_STATIC },       /* 482 = shm_open */
+       { compat12(AS(freebsd12_shm_open_args),shm_open), AUE_SHMOPEN, NULL, 0, 
0, SYF_CAPENABLED, SY_THR_STATIC },     /* 482 = freebsd12 shm_open */
        { AS(shm_unlink_args), (sy_call_t *)sys_shm_unlink, AUE_SHMUNLINK, 
NULL, 0, 0, 0, SY_THR_STATIC },      /* 483 = shm_unlink */
        { AS(cpuset_args), (sy_call_t *)sys_cpuset, AUE_NULL, NULL, 0, 0, 0, 
SY_THR_STATIC },   /* 484 = cpuset */
 #ifdef PAD64_REQUIRED

Modified: head/sys/compat/freebsd32/freebsd32_systrace_args.c
==============================================================================
--- head/sys/compat/freebsd32/freebsd32_systrace_args.c Wed Sep 25 18:06:48 
2019        (r352705)
+++ head/sys/compat/freebsd32/freebsd32_systrace_args.c Wed Sep 25 18:09:19 
2019        (r352706)
@@ -2491,15 +2491,6 @@ systrace_args(int sysnum, void *params, uint64_t *uarg
                *n_args = 3;
                break;
        }
-       /* shm_open */
-       case 482: {
-               struct shm_open_args *p = params;
-               uarg[0] = (intptr_t) p->path; /* const char * */
-               iarg[1] = p->flags; /* int */
-               iarg[2] = p->mode; /* mode_t */
-               *n_args = 3;
-               break;
-       }
        /* shm_unlink */
        case 483: {
                struct shm_unlink_args *p = params;
@@ -7453,22 +7444,6 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d
                        break;
                };
                break;
-       /* shm_open */
-       case 482:
-               switch(ndx) {
-               case 0:
-                       p = "userland const char *";
-                       break;
-               case 1:
-                       p = "int";
-                       break;
-               case 2:
-                       p = "mode_t";
-                       break;
-               default:
-                       break;
-               };
-               break;
        /* shm_unlink */
        case 483:
                switch(ndx) {
@@ -10473,11 +10448,6 @@ systrace_return_setargdesc(int sysnum, int ndx, char *
 #endif
        /* thr_kill2 */
        case 481:
-               if (ndx == 0 || ndx == 1)
-                       p = "int";
-               break;
-       /* shm_open */
-       case 482:
                if (ndx == 0 || ndx == 1)
                        p = "int";
                break;

Modified: head/sys/kern/init_sysent.c
==============================================================================
--- head/sys/kern/init_sysent.c Wed Sep 25 18:06:48 2019        (r352705)
+++ head/sys/kern/init_sysent.c Wed Sep 25 18:09:19 2019        (r352706)
@@ -47,6 +47,12 @@
 #define compat11(n, name) 0, (sy_call_t *)nosys
 #endif
 
+#ifdef COMPAT_FREEBSD12
+#define compat12(n, name) n, (sy_call_t *)__CONCAT(freebsd12_,name)
+#else
+#define compat12(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 */
@@ -531,7 +537,7 @@ struct sysent sysent[] = {
        { AS(truncate_args), (sy_call_t *)sys_truncate, AUE_TRUNCATE, NULL, 0, 
0, 0, SY_THR_STATIC },   /* 479 = truncate */
        { AS(ftruncate_args), (sy_call_t *)sys_ftruncate, AUE_FTRUNCATE, NULL, 
0, 0, SYF_CAPENABLED, SY_THR_STATIC },   /* 480 = ftruncate */
        { AS(thr_kill2_args), (sy_call_t *)sys_thr_kill2, AUE_THR_KILL2, NULL, 
0, 0, 0, SY_THR_STATIC },        /* 481 = thr_kill2 */
-       { AS(shm_open_args), (sy_call_t *)sys_shm_open, AUE_SHMOPEN, NULL, 0, 
0, SYF_CAPENABLED, SY_THR_STATIC },       /* 482 = shm_open */
+       { compat12(AS(freebsd12_shm_open_args),shm_open), AUE_SHMOPEN, NULL, 0, 
0, SYF_CAPENABLED, SY_THR_STATIC },     /* 482 = freebsd12 shm_open */
        { AS(shm_unlink_args), (sy_call_t *)sys_shm_unlink, AUE_SHMUNLINK, 
NULL, 0, 0, 0, SY_THR_STATIC },      /* 483 = shm_unlink */
        { AS(cpuset_args), (sy_call_t *)sys_cpuset, AUE_NULL, NULL, 0, 0, 0, 
SY_THR_STATIC },   /* 484 = cpuset */
        { AS(cpuset_setid_args), (sy_call_t *)sys_cpuset_setid, AUE_NULL, NULL, 
0, 0, 0, SY_THR_STATIC },       /* 485 = cpuset_setid */

Modified: head/sys/kern/syscalls.c
==============================================================================
--- head/sys/kern/syscalls.c    Wed Sep 25 18:06:48 2019        (r352705)
+++ head/sys/kern/syscalls.c    Wed Sep 25 18:09:19 2019        (r352706)
@@ -488,7 +488,7 @@ const char *syscallnames[] = {
        "truncate",                     /* 479 = truncate */
        "ftruncate",                    /* 480 = ftruncate */
        "thr_kill2",                    /* 481 = thr_kill2 */
-       "shm_open",                     /* 482 = shm_open */
+       "compat12.shm_open",            /* 482 = freebsd12 shm_open */
        "shm_unlink",                   /* 483 = shm_unlink */
        "cpuset",                       /* 484 = cpuset */
        "cpuset_setid",                 /* 485 = cpuset_setid */

Modified: head/sys/kern/systrace_args.c
==============================================================================
--- head/sys/kern/systrace_args.c       Wed Sep 25 18:06:48 2019        
(r352705)
+++ head/sys/kern/systrace_args.c       Wed Sep 25 18:09:19 2019        
(r352706)
@@ -2575,15 +2575,6 @@ systrace_args(int sysnum, void *params, uint64_t *uarg
                *n_args = 3;
                break;
        }
-       /* shm_open */
-       case 482: {
-               struct shm_open_args *p = params;
-               uarg[0] = (intptr_t) p->path; /* const char * */
-               iarg[1] = p->flags; /* int */
-               iarg[2] = p->mode; /* mode_t */
-               *n_args = 3;
-               break;
-       }
        /* shm_unlink */
        case 483: {
                struct shm_unlink_args *p = params;
@@ -7555,22 +7546,6 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d
                        break;
                };
                break;
-       /* shm_open */
-       case 482:
-               switch(ndx) {
-               case 0:
-                       p = "userland const char *";
-                       break;
-               case 1:
-                       p = "int";
-                       break;
-               case 2:
-                       p = "mode_t";
-                       break;
-               default:
-                       break;
-               };
-               break;
        /* shm_unlink */
        case 483:
                switch(ndx) {
@@ -10442,11 +10417,6 @@ systrace_return_setargdesc(int sysnum, int ndx, char *
                break;
        /* thr_kill2 */
        case 481:
-               if (ndx == 0 || ndx == 1)
-                       p = "int";
-               break;
-       /* shm_open */
-       case 482:
                if (ndx == 0 || ndx == 1)
                        p = "int";
                break;

Modified: head/sys/kern/uipc_shm.c
==============================================================================
--- head/sys/kern/uipc_shm.c    Wed Sep 25 18:06:48 2019        (r352705)
+++ head/sys/kern/uipc_shm.c    Wed Sep 25 18:09:19 2019        (r352706)
@@ -904,13 +904,15 @@ kern_shm_open(struct thread *td, const char *userpath,
 }
 
 /* System calls. */
+#ifdef COMPAT_FREEBSD12
 int
-sys_shm_open(struct thread *td, struct shm_open_args *uap)
+freebsd12_shm_open(struct thread *td, struct freebsd12_shm_open_args *uap)
 {
 
        return (kern_shm_open(td, uap->path, uap->flags | O_CLOEXEC, uap->mode,
            NULL, F_SEAL_SEAL));
 }
+#endif
 
 int
 sys_shm_unlink(struct thread *td, struct shm_unlink_args *uap)

Modified: head/sys/sys/syscall.h
==============================================================================
--- head/sys/sys/syscall.h      Wed Sep 25 18:06:48 2019        (r352705)
+++ head/sys/sys/syscall.h      Wed Sep 25 18:09:19 2019        (r352706)
@@ -418,7 +418,7 @@
 #define        SYS_truncate    479
 #define        SYS_ftruncate   480
 #define        SYS_thr_kill2   481
-#define        SYS_shm_open    482
+#define        SYS_freebsd12_shm_open  482
 #define        SYS_shm_unlink  483
 #define        SYS_cpuset      484
 #define        SYS_cpuset_setid        485

Modified: head/sys/sys/syscall.mk
==============================================================================
--- head/sys/sys/syscall.mk     Wed Sep 25 18:06:48 2019        (r352705)
+++ head/sys/sys/syscall.mk     Wed Sep 25 18:09:19 2019        (r352706)
@@ -327,7 +327,7 @@ MIASM =  \
        truncate.o \
        ftruncate.o \
        thr_kill2.o \
-       shm_open.o \
+       freebsd12_shm_open.o \
        shm_unlink.o \
        cpuset.o \
        cpuset_setid.o \

Modified: head/sys/sys/sysproto.h
==============================================================================
--- head/sys/sys/sysproto.h     Wed Sep 25 18:06:48 2019        (r352705)
+++ head/sys/sys/sysproto.h     Wed Sep 25 18:09:19 2019        (r352706)
@@ -1381,11 +1381,6 @@ struct thr_kill2_args {
        char id_l_[PADL_(long)]; long id; char id_r_[PADR_(long)];
        char sig_l_[PADL_(int)]; int sig; char sig_r_[PADR_(int)];
 };
-struct shm_open_args {
-       char path_l_[PADL_(const char *)]; const char * path; char 
path_r_[PADR_(const char *)];
-       char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)];
-       char mode_l_[PADL_(mode_t)]; mode_t mode; char mode_r_[PADR_(mode_t)];
-};
 struct shm_unlink_args {
        char path_l_[PADL_(const char *)]; const char * path; char 
path_r_[PADR_(const char *)];
 };
@@ -2123,7 +2118,6 @@ int       sys_lseek(struct thread *, struct lseek_args *);
 int    sys_truncate(struct thread *, struct truncate_args *);
 int    sys_ftruncate(struct thread *, struct ftruncate_args *);
 int    sys_thr_kill2(struct thread *, struct thr_kill2_args *);
-int    sys_shm_open(struct thread *, struct shm_open_args *);
 int    sys_shm_unlink(struct thread *, struct shm_unlink_args *);
 int    sys_cpuset(struct thread *, struct cpuset_args *);
 int    sys_cpuset_setid(struct thread *, struct cpuset_setid_args *);
@@ -2654,6 +2648,12 @@ int      freebsd11_mknodat(struct thread *, struct 
freebsd1
 
 #ifdef COMPAT_FREEBSD12
 
+struct freebsd12_shm_open_args {
+       char path_l_[PADL_(const char *)]; const char * path; char 
path_r_[PADR_(const char *)];
+       char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)];
+       char mode_l_[PADL_(mode_t)]; mode_t mode; char mode_r_[PADR_(mode_t)];
+};
+int    freebsd12_shm_open(struct thread *, struct freebsd12_shm_open_args *);
 
 #endif /* COMPAT_FREEBSD12 */
 
@@ -3037,7 +3037,7 @@ int       freebsd11_mknodat(struct thread *, struct 
freebsd1
 #define        SYS_AUE_truncate        AUE_TRUNCATE
 #define        SYS_AUE_ftruncate       AUE_FTRUNCATE
 #define        SYS_AUE_thr_kill2       AUE_THR_KILL2
-#define        SYS_AUE_shm_open        AUE_SHMOPEN
+#define        SYS_AUE_freebsd12_shm_open      AUE_SHMOPEN
 #define        SYS_AUE_shm_unlink      AUE_SHMUNLINK
 #define        SYS_AUE_cpuset  AUE_NULL
 #define        SYS_AUE_cpuset_setid    AUE_NULL

Modified: head/usr.bin/kdump/kdump.c
==============================================================================
--- head/usr.bin/kdump/kdump.c  Wed Sep 25 18:06:48 2019        (r352705)
+++ head/usr.bin/kdump/kdump.c  Wed Sep 25 18:09:19 2019        (r352706)
@@ -1246,7 +1246,8 @@ ktrsyscall(struct ktr_syscall *ktr, u_int sv_flags)
                                ip++;
                                narg--;
                                break;
-                       case SYS_shm_open:
+#ifdef SYS_freebsd12_shm_open
+                       case SYS_freebsd12_shm_open:
                                print_number(ip, narg, c);
                                putchar(',');
                                print_mask_arg(sysdecode_open_flags, ip[0]);
@@ -1255,6 +1256,7 @@ ktrsyscall(struct ktr_syscall *ktr, u_int sv_flags)
                                ip += 2;
                                narg -= 2;
                                break;
+#endif
                        case SYS_minherit:
                                print_number(ip, narg, c);
                                print_number(ip, narg, c);
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to