summaryrefslogtreecommitdiffstats
path: root/sys/compat
diff options
context:
space:
mode:
Diffstat (limited to 'sys/compat')
-rw-r--r--sys/compat/freebsd32/freebsd32.h1
-rw-r--r--sys/compat/freebsd32/freebsd32_misc.c21
-rw-r--r--sys/compat/freebsd32/syscalls.master9
3 files changed, 31 insertions, 0 deletions
diff --git a/sys/compat/freebsd32/freebsd32.h b/sys/compat/freebsd32/freebsd32.h
index aa08432..e6644f6 100644
--- a/sys/compat/freebsd32/freebsd32.h
+++ b/sys/compat/freebsd32/freebsd32.h
@@ -342,6 +342,7 @@ struct kinfo_proc32 {
char ki_loginclass[LOGINCLASSLEN+1];
char ki_sparestrings[50];
int ki_spareints[KI_NSPARE_INT];
+ int ki_flag2;
int ki_fibnum;
u_int ki_cr_flags;
int ki_jid;
diff --git a/sys/compat/freebsd32/freebsd32_misc.c b/sys/compat/freebsd32/freebsd32_misc.c
index dbdafeb..deb03f3 100644
--- a/sys/compat/freebsd32/freebsd32_misc.c
+++ b/sys/compat/freebsd32/freebsd32_misc.c
@@ -56,6 +56,7 @@ __FBSDID("$FreeBSD$");
#include <sys/mutex.h>
#include <sys/namei.h>
#include <sys/proc.h>
+#include <sys/procctl.h>
#include <sys/reboot.h>
#include <sys/resource.h>
#include <sys/resourcevar.h>
@@ -3000,3 +3001,23 @@ convert_sigevent32(struct sigevent32 *sig32, struct sigevent *sig)
}
return (0);
}
+
+int
+freebsd32_procctl(struct thread *td, struct freebsd32_procctl_args *uap)
+{
+ void *data;
+ int error, flags;
+
+ switch (uap->com) {
+ case PROC_SPROTECT:
+ error = copyin(PTRIN(uap->data), &flags, sizeof(flags));
+ if (error)
+ return (error);
+ data = &flags;
+ break;
+ default:
+ return (EINVAL);
+ }
+ return (kern_procctl(td, uap->idtype, PAIR32TO64(id_t, uap->id),
+ uap->com, data));
+}
diff --git a/sys/compat/freebsd32/syscalls.master b/sys/compat/freebsd32/syscalls.master
index c52256a..90c3e75 100644
--- a/sys/compat/freebsd32/syscalls.master
+++ b/sys/compat/freebsd32/syscalls.master
@@ -1056,3 +1056,12 @@
542 AUE_PIPE NOPROTO { int pipe2(int *fildes, int flags); }
543 AUE_NULL NOSTD { int freebsd32_aio_mlock( \
struct aiocb32 *aiocbp); }
+#ifdef PAD64_REQUIRED
+544 AUE_NULL STD { int freebsd32_procctl(int idtype, int pad, \
+ uint32_t id1, uint32_t id2, int com, \
+ void *data); }
+#else
+544 AUE_NULL STD { int freebsd32_procctl(int idtype, \
+ uint32_t id1, uint32_t id2, int com, \
+ void *data); }
+#endif
OpenPOWER on IntegriCloud