$OpenBSD: patch-util_c,v 1.2 2020/11/09 14:05:48 sthen Exp $
Index: util.c
--- util.c.orig
+++ util.c
@@ -184,6 +184,10 @@ void *mem_chunk(off_t base, size_t len, const char *de
if ((fd = open(devmem, O_RDONLY)) == -1)
{
perror(devmem);
+ if (errno == EPERM) {
+ fprintf(stderr, "Note: requires running as root with "
+ "access to kernel memory (kern.allowkmem=1).\n");
+ }
return NULL;
}