aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/imgact_binmisc.h
diff options
context:
space:
mode:
authorKyle Evans <kevans@FreeBSD.org>2020-11-07 04:10:23 +0000
committerKyle Evans <kevans@FreeBSD.org>2020-11-07 04:10:23 +0000
commit7d3ed9777a184e70bcb91201c1ff98df953aee2b (patch)
treebe41ec94924539d796ee3b7c06e85cbcc62cd13a /sys/sys/imgact_binmisc.h
parent2c5e865059a287fde8a37d66793d84f90cb77712 (diff)
downloadsrc-7d3ed9777a184e70bcb91201c1ff98df953aee2b.tar.gz
src-7d3ed9777a184e70bcb91201c1ff98df953aee2b.zip
imgact_binmisc: validate flags coming from userland
We may want to reserve bits in the future for kernel-only use, so start rejecting any that aren't the two that we're currently expecting from userland. MFC after: 1 week
Notes
Notes: svn path=/head/; revision=367442
Diffstat (limited to 'sys/sys/imgact_binmisc.h')
-rw-r--r--sys/sys/imgact_binmisc.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/sys/imgact_binmisc.h b/sys/sys/imgact_binmisc.h
index ef976ade464b..add100110fd6 100644
--- a/sys/sys/imgact_binmisc.h
+++ b/sys/sys/imgact_binmisc.h
@@ -53,6 +53,8 @@
#define IBF_ENABLED 0x0001 /* Entry is active. */
#define IBF_USE_MASK 0x0002 /* Use mask on header magic field. */
+#define IBF_VALID_UFLAGS 0x0003 /* Bits allowed from userland. */
+
/*
* Used with sysctlbyname() to pass imgact bin misc entries in and out of the
* kernel.