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.
This commit is contained in:
parent
df8ec3c155
commit
1d9983b221
@ -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:"
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -2491,15 +2491,6 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args)
|
||||
*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 *desc, size_t descsz)
|
||||
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) {
|
||||
@ -10476,11 +10451,6 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
|
||||
if (ndx == 0 || ndx == 1)
|
||||
p = "int";
|
||||
break;
|
||||
/* shm_open */
|
||||
case 482:
|
||||
if (ndx == 0 || ndx == 1)
|
||||
p = "int";
|
||||
break;
|
||||
/* shm_unlink */
|
||||
case 483:
|
||||
if (ndx == 0 || ndx == 1)
|
||||
|
@ -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 */
|
||||
|
@ -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 */
|
||||
|
@ -2575,15 +2575,6 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args)
|
||||
*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 *desc, size_t descsz)
|
||||
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) {
|
||||
@ -10445,11 +10420,6 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
|
||||
if (ndx == 0 || ndx == 1)
|
||||
p = "int";
|
||||
break;
|
||||
/* shm_open */
|
||||
case 482:
|
||||
if (ndx == 0 || ndx == 1)
|
||||
p = "int";
|
||||
break;
|
||||
/* shm_unlink */
|
||||
case 483:
|
||||
if (ndx == 0 || ndx == 1)
|
||||
|
@ -904,13 +904,15 @@ kern_shm_open(struct thread *td, const char *userpath, int flags, mode_t mode,
|
||||
}
|
||||
|
||||
/* 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)
|
||||
|
@ -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
|
||||
|
@ -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 \
|
||||
|
@ -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 freebsd11_mknodat_args *);
|
||||
|
||||
#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 freebsd11_mknodat_args *);
|
||||
#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
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user