From 659a2e9243cdaedfa122f4258a8ef7f02c9f9c80 Mon Sep 17 00:00:00 2001 From: Brooks Davis Date: Fri, 25 May 2018 20:41:26 +0000 Subject: [PATCH] Regen after r334223: make vadvise compat freebsd11. --- sys/compat/freebsd32/freebsd32_syscall.h | 2 +- sys/compat/freebsd32/freebsd32_syscalls.c | 2 +- sys/compat/freebsd32/freebsd32_sysent.c | 2 +- .../freebsd32/freebsd32_systrace_args.c | 22 ------------------- sys/kern/init_sysent.c | 2 +- sys/kern/syscalls.c | 2 +- sys/kern/systrace_args.c | 22 ------------------- sys/sys/syscall.h | 2 +- sys/sys/syscall.mk | 2 +- sys/sys/sysproto.h | 10 ++++----- 10 files changed, 12 insertions(+), 56 deletions(-) diff --git a/sys/compat/freebsd32/freebsd32_syscall.h b/sys/compat/freebsd32/freebsd32_syscall.h index c44e38259be1..24f52aa620b9 100644 --- a/sys/compat/freebsd32/freebsd32_syscall.h +++ b/sys/compat/freebsd32/freebsd32_syscall.h @@ -77,7 +77,7 @@ #define FREEBSD32_SYS_sbrk 69 #define FREEBSD32_SYS_sstk 70 /* 71 is old mmap */ -#define FREEBSD32_SYS_vadvise 72 +#define FREEBSD32_SYS_freebsd11_vadvise 72 #define FREEBSD32_SYS_munmap 73 #define FREEBSD32_SYS_freebsd32_mprotect 74 #define FREEBSD32_SYS_madvise 75 diff --git a/sys/compat/freebsd32/freebsd32_syscalls.c b/sys/compat/freebsd32/freebsd32_syscalls.c index 92ade167235e..e9767109ba27 100644 --- a/sys/compat/freebsd32/freebsd32_syscalls.c +++ b/sys/compat/freebsd32/freebsd32_syscalls.c @@ -81,7 +81,7 @@ const char *freebsd32_syscallnames[] = { "sbrk", /* 69 = sbrk */ "sstk", /* 70 = sstk */ "compat.mmap", /* 71 = old mmap */ - "vadvise", /* 72 = vadvise */ + "compat11.vadvise", /* 72 = freebsd11 vadvise */ "munmap", /* 73 = munmap */ "freebsd32_mprotect", /* 74 = freebsd32_mprotect */ "madvise", /* 75 = madvise */ diff --git a/sys/compat/freebsd32/freebsd32_sysent.c b/sys/compat/freebsd32/freebsd32_sysent.c index 59efd2499c3a..0394db9000b0 100644 --- a/sys/compat/freebsd32/freebsd32_sysent.c +++ b/sys/compat/freebsd32/freebsd32_sysent.c @@ -128,7 +128,7 @@ struct sysent freebsd32_sysent[] = { { AS(sbrk_args), (sy_call_t *)sys_sbrk, AUE_SBRK, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 69 = sbrk */ { AS(sstk_args), (sy_call_t *)sys_sstk, AUE_SSTK, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 70 = sstk */ { compat(AS(ommap_args),mmap), AUE_MMAP, NULL, 0, 0, 0, SY_THR_STATIC }, /* 71 = old mmap */ - { AS(ovadvise_args), (sy_call_t *)sys_ovadvise, AUE_O_VADVISE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 72 = vadvise */ + { compat11(AS(freebsd11_vadvise_args),vadvise), AUE_O_VADVISE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 72 = freebsd11 vadvise */ { AS(munmap_args), (sy_call_t *)sys_munmap, AUE_MUNMAP, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 73 = munmap */ { AS(freebsd32_mprotect_args), (sy_call_t *)freebsd32_mprotect, AUE_MPROTECT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 74 = freebsd32_mprotect */ { AS(madvise_args), (sy_call_t *)sys_madvise, AUE_MADVISE, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 75 = madvise */ diff --git a/sys/compat/freebsd32/freebsd32_systrace_args.c b/sys/compat/freebsd32/freebsd32_systrace_args.c index f23fe5b7347a..a584353d7443 100644 --- a/sys/compat/freebsd32/freebsd32_systrace_args.c +++ b/sys/compat/freebsd32/freebsd32_systrace_args.c @@ -435,13 +435,6 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) *n_args = 1; break; } - /* ovadvise */ - case 72: { - struct ovadvise_args *p = params; - iarg[0] = p->anom; /* int */ - *n_args = 1; - break; - } /* munmap */ case 73: { struct munmap_args *p = params; @@ -3944,16 +3937,6 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) break; }; break; - /* ovadvise */ - case 72: - switch(ndx) { - case 0: - p = "int"; - break; - default: - break; - }; - break; /* munmap */ case 73: switch(ndx) { @@ -9084,11 +9067,6 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) if (ndx == 0 || ndx == 1) p = "int"; break; - /* ovadvise */ - case 72: - if (ndx == 0 || ndx == 1) - p = "int"; - break; /* munmap */ case 73: if (ndx == 0 || ndx == 1) diff --git a/sys/kern/init_sysent.c b/sys/kern/init_sysent.c index 91a3ff497e29..6c20fe9b2658 100644 --- a/sys/kern/init_sysent.c +++ b/sys/kern/init_sysent.c @@ -121,7 +121,7 @@ struct sysent sysent[] = { { AS(sbrk_args), (sy_call_t *)sys_sbrk, AUE_SBRK, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 69 = sbrk */ { AS(sstk_args), (sy_call_t *)sys_sstk, AUE_SSTK, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 70 = sstk */ { compat(AS(ommap_args),mmap), AUE_MMAP, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 71 = old mmap */ - { AS(ovadvise_args), (sy_call_t *)sys_ovadvise, AUE_O_VADVISE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 72 = vadvise */ + { compat11(AS(freebsd11_vadvise_args),vadvise), AUE_O_VADVISE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 72 = freebsd11 vadvise */ { AS(munmap_args), (sy_call_t *)sys_munmap, AUE_MUNMAP, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 73 = munmap */ { AS(mprotect_args), (sy_call_t *)sys_mprotect, AUE_MPROTECT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 74 = mprotect */ { AS(madvise_args), (sy_call_t *)sys_madvise, AUE_MADVISE, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 75 = madvise */ diff --git a/sys/kern/syscalls.c b/sys/kern/syscalls.c index 464b2b19e780..90702561a8ec 100644 --- a/sys/kern/syscalls.c +++ b/sys/kern/syscalls.c @@ -78,7 +78,7 @@ const char *syscallnames[] = { "sbrk", /* 69 = sbrk */ "sstk", /* 70 = sstk */ "compat.mmap", /* 71 = old mmap */ - "vadvise", /* 72 = vadvise */ + "compat11.vadvise", /* 72 = freebsd11 vadvise */ "munmap", /* 73 = munmap */ "mprotect", /* 74 = mprotect */ "madvise", /* 75 = madvise */ diff --git a/sys/kern/systrace_args.c b/sys/kern/systrace_args.c index 281e26f4677f..102ab9524638 100644 --- a/sys/kern/systrace_args.c +++ b/sys/kern/systrace_args.c @@ -432,13 +432,6 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) *n_args = 1; break; } - /* ovadvise */ - case 72: { - struct ovadvise_args *p = params; - iarg[0] = p->anom; /* int */ - *n_args = 1; - break; - } /* munmap */ case 73: { struct munmap_args *p = params; @@ -3949,16 +3942,6 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) break; }; break; - /* ovadvise */ - case 72: - switch(ndx) { - case 0: - p = "int"; - break; - default: - break; - }; - break; /* munmap */ case 73: switch(ndx) { @@ -9033,11 +9016,6 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) if (ndx == 0 || ndx == 1) p = "int"; break; - /* ovadvise */ - case 72: - if (ndx == 0 || ndx == 1) - p = "int"; - break; /* munmap */ case 73: if (ndx == 0 || ndx == 1) diff --git a/sys/sys/syscall.h b/sys/sys/syscall.h index c52db562fb85..0135eb378260 100644 --- a/sys/sys/syscall.h +++ b/sys/sys/syscall.h @@ -77,7 +77,7 @@ #define SYS_sbrk 69 #define SYS_sstk 70 /* 71 is old mmap */ -#define SYS_vadvise 72 +#define SYS_freebsd11_vadvise 72 #define SYS_munmap 73 #define SYS_mprotect 74 #define SYS_madvise 75 diff --git a/sys/sys/syscall.mk b/sys/sys/syscall.mk index c3daf3545968..e2b76ef47706 100644 --- a/sys/sys/syscall.mk +++ b/sys/sys/syscall.mk @@ -59,7 +59,7 @@ MIASM = \ vfork.o \ sbrk.o \ sstk.o \ - vadvise.o \ + freebsd11_vadvise.o \ munmap.o \ mprotect.o \ madvise.o \ diff --git a/sys/sys/sysproto.h b/sys/sys/sysproto.h index c36435a22317..a6322e8b8d00 100644 --- a/sys/sys/sysproto.h +++ b/sys/sys/sysproto.h @@ -264,9 +264,6 @@ struct sbrk_args { struct sstk_args { char incr_l_[PADL_(int)]; int incr; char incr_r_[PADR_(int)]; }; -struct ovadvise_args { - char anom_l_[PADL_(int)]; int anom; char anom_r_[PADR_(int)]; -}; struct munmap_args { char addr_l_[PADL_(void *)]; void * addr; char addr_r_[PADR_(void *)]; char len_l_[PADL_(size_t)]; size_t len; char len_r_[PADR_(size_t)]; @@ -1828,7 +1825,6 @@ int sys_msync(struct thread *, struct msync_args *); int sys_vfork(struct thread *, struct vfork_args *); int sys_sbrk(struct thread *, struct sbrk_args *); int sys_sstk(struct thread *, struct sstk_args *); -int sys_ovadvise(struct thread *, struct ovadvise_args *); int sys_munmap(struct thread *, struct munmap_args *); int sys_mprotect(struct thread *, struct mprotect_args *); int sys_madvise(struct thread *, struct madvise_args *); @@ -2493,6 +2489,9 @@ struct freebsd11_mknod_args { char mode_l_[PADL_(int)]; int mode; char mode_r_[PADR_(int)]; char dev_l_[PADL_(int)]; int dev; char dev_r_[PADR_(int)]; }; +struct freebsd11_vadvise_args { + char anom_l_[PADL_(int)]; int anom; char anom_r_[PADR_(int)]; +}; struct freebsd11_stat_args { char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; char ub_l_[PADL_(struct freebsd11_stat *)]; struct freebsd11_stat * ub; char ub_r_[PADR_(struct freebsd11_stat *)]; @@ -2570,6 +2569,7 @@ struct freebsd11_mknodat_args { char dev_l_[PADL_(uint32_t)]; uint32_t dev; char dev_r_[PADR_(uint32_t)]; }; int freebsd11_mknod(struct thread *, struct freebsd11_mknod_args *); +int freebsd11_vadvise(struct thread *, struct freebsd11_vadvise_args *); int freebsd11_stat(struct thread *, struct freebsd11_stat_args *); int freebsd11_fstat(struct thread *, struct freebsd11_fstat_args *); int freebsd11_lstat(struct thread *, struct freebsd11_lstat_args *); @@ -2658,7 +2658,7 @@ int freebsd11_mknodat(struct thread *, struct freebsd11_mknodat_args *); #define SYS_AUE_sbrk AUE_SBRK #define SYS_AUE_sstk AUE_SSTK #define SYS_AUE_ommap AUE_MMAP -#define SYS_AUE_vadvise AUE_O_VADVISE +#define SYS_AUE_freebsd11_vadvise AUE_O_VADVISE #define SYS_AUE_munmap AUE_MUNMAP #define SYS_AUE_mprotect AUE_MPROTECT #define SYS_AUE_madvise AUE_MADVISE