summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--regress/sys/uvm/wx_syscall/Makefile25
-rw-r--r--regress/sys/uvm/wx_syscall/wx_syscall.c31
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");
-}