diff options
| author | 2011-02-11 21:40:04 +0000 | |
|---|---|---|
| committer | 2011-02-11 21:40:04 +0000 | |
| commit | 408707d24e3380cb6d4185d90c75cf3b7cb44547 (patch) | |
| tree | bfc11e23bd17ece60f2d753241d976adbdaf4199 /sys/compat/linux/linux_misc.c | |
| parent | Port over a fix from Chris Wilson to poke the 855GM GWB/HIC bit. (diff) | |
| download | wireguard-openbsd-408707d24e3380cb6d4185d90c75cf3b7cb44547.tar.xz wireguard-openbsd-408707d24e3380cb6d4185d90c75cf3b7cb44547.zip | |
Add linux_mprotect() syscall. Okay otto@.
Diffstat (limited to 'sys/compat/linux/linux_misc.c')
| -rw-r--r-- | sys/compat/linux/linux_misc.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c index cb7abec8993..455a62097d3 100644 --- a/sys/compat/linux/linux_misc.c +++ b/sys/compat/linux/linux_misc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: linux_misc.c,v 1.65 2010/07/26 01:56:27 guenther Exp $ */ +/* $OpenBSD: linux_misc.c,v 1.66 2011/02/11 21:40:04 pirofti Exp $ */ /* $NetBSD: linux_misc.c,v 1.27 1996/05/20 01:59:21 fvdl Exp $ */ /*- @@ -1474,3 +1474,13 @@ linux_sys_sysinfo(p, v, retval) return (copyout(&si, SCARG(uap, sysinfo), sizeof(si))); } + +int +linux_sys_mprotect(struct proc *p, void *v, register_t *retval) +{ + struct sys_mprotect_args *uap = v; + + if (SCARG(uap, prot) & (PROT_WRITE | PROT_EXEC)) + SCARG(uap, prot) |= PROT_READ; + return (sys_mprotect(p, uap, retval)); +} |
