diff options
author | Anton Lindqvist <anton@cvs.openbsd.org> | 2023-01-10 12:19:19 +0000 |
---|---|---|
committer | Anton Lindqvist <anton@cvs.openbsd.org> | 2023-01-10 12:19:19 +0000 |
commit | 625992519b881f0219dc6b4afd2e18fc72d46caa (patch) | |
tree | ab403dac1fc0973d8f038cceed3d7bb4e9464113 /regress | |
parent | 8d58255afccc9f2e67d3f31e6ce9dcff5841307c (diff) |
purge unhooked wx_syscall files
Diffstat (limited to 'regress')
-rw-r--r-- | regress/sys/uvm/wx_syscall/Makefile | 25 | ||||
-rw-r--r-- | regress/sys/uvm/wx_syscall/wx_syscall.c | 31 |
2 files changed, 0 insertions, 56 deletions
diff --git a/regress/sys/uvm/wx_syscall/Makefile b/regress/sys/uvm/wx_syscall/Makefile deleted file mode 100644 index 196bdf53e1c..00000000000 --- a/regress/sys/uvm/wx_syscall/Makefile +++ /dev/null @@ -1,25 +0,0 @@ -# $OpenBSD: Makefile,v 1.3 2021/09/28 08:51:17 kettenis Exp $ - -# The regression test binary must be run on a wxallowed filesystem -# to verify correct behaviour (it should crash) - -.if ! (make(clean) || make(cleandir) || make(obj)) - -MOUNT_OBJ !!= mount | grep ^$$(df -P . | tail -1 | awk '{ print $$1 }') - -.if "${MOUNT_OBJ:M*wxallowed*}" == "" -regress: - echo '${MOUNT_OBJ}' - echo object directory needs mount option wxallowed - echo SKIPPED -.endif - -.endif - -PROG= wx_syscall -LDFLAGS= -Wl,-z,wxneeded - -run-regress-wx_syscall: wx_syscall - ! ./wx_syscall - -.include <bsd.regress.mk> diff --git a/regress/sys/uvm/wx_syscall/wx_syscall.c b/regress/sys/uvm/wx_syscall/wx_syscall.c deleted file mode 100644 index c4531a42c50..00000000000 --- a/regress/sys/uvm/wx_syscall/wx_syscall.c +++ /dev/null @@ -1,31 +0,0 @@ -#include <sys/types.h> -#include <sys/mman.h> - -#include <err.h> -#include <errno.h> -#include <fcntl.h> -#include <stdio.h> -#include <stdlib.h> -#include <unistd.h> - -int -main() -{ - vaddr_t o = (vaddr_t)flock; - int psz = getpagesize(); - - printf("%llx\n", (long long)flock); - if (mprotect((void *)(o & ~(psz - 1)), psz, - PROT_EXEC|PROT_WRITE|PROT_READ) == -1) { - if (errno == ENOTSUP) { - printf("mprotect -> ENOTSUP? Please run from " - "wxallowed filesystem\n"); - } else { - warn("mprotect"); - } - exit(0); - } - flock(0, 0); - - printf("performing syscall succeeded. Should have been killed.\n"); -} |