From f43f234eb807580b2fa68dff510e505c5477501e Mon Sep 17 00:00:00 2001 From: anton Date: Tue, 10 Jan 2023 12:19:18 +0000 Subject: [PATCH] purge unhooked wx_syscall files --- regress/sys/uvm/wx_syscall/Makefile | 25 -------------------- regress/sys/uvm/wx_syscall/wx_syscall.c | 31 ------------------------- 2 files changed, 56 deletions(-) delete mode 100644 regress/sys/uvm/wx_syscall/Makefile delete mode 100644 regress/sys/uvm/wx_syscall/wx_syscall.c 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 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 -#include - -#include -#include -#include -#include -#include -#include - -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"); -} -- 2.20.1