purge unhooked wx_syscall files
authoranton <anton@openbsd.org>
Tue, 10 Jan 2023 12:19:18 +0000 (12:19 +0000)
committeranton <anton@openbsd.org>
Tue, 10 Jan 2023 12:19:18 +0000 (12:19 +0000)
regress/sys/uvm/wx_syscall/Makefile [deleted file]
regress/sys/uvm/wx_syscall/wx_syscall.c [deleted file]

diff --git a/regress/sys/uvm/wx_syscall/Makefile b/regress/sys/uvm/wx_syscall/Makefile
deleted file mode 100644 (file)
index 196bdf5..0000000
+++ /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 (file)
index c4531a4..0000000
+++ /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");
-}