aboutsummaryrefslogtreecommitdiff
path: root/sbin/mdconfig
diff options
context:
space:
mode:
authorJaakko Heinonen <jh@FreeBSD.org>2012-11-21 16:56:47 +0000
committerJaakko Heinonen <jh@FreeBSD.org>2012-11-21 16:56:47 +0000
commit734e78dfcb0b1c724a336101db3edd5519ef342f (patch)
tree227473eb3fd1d660b3c693f005447db9296b6c5b /sbin/mdconfig
parentaef8ef5168a842181bb0dd1a275f7c253b965232 (diff)
downloadsrc-734e78dfcb0b1c724a336101db3edd5519ef342f.tar.gz
src-734e78dfcb0b1c724a336101db3edd5519ef342f.zip
Disallow attaching preloaded memory disks via ioctl.
- The feature is dangerous because the kernel code didn't check validity of the memory address provided from user space. - It seems that mdconfig(8) never really supported attaching preloaded memory disks. - Preloaded memory disks are automatically attached during md(4) initialization. Thus there shouldn't be much use for the feature. PR: kern/169683 Discussed on: freebsd-hackers
Notes
Notes: svn path=/head/; revision=243372
Diffstat (limited to 'sbin/mdconfig')
-rw-r--r--sbin/mdconfig/mdconfig.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/sbin/mdconfig/mdconfig.c b/sbin/mdconfig/mdconfig.c
index 55d1567ca970..70cefe916d19 100644
--- a/sbin/mdconfig/mdconfig.c
+++ b/sbin/mdconfig/mdconfig.c
@@ -84,7 +84,7 @@ usage(void)
" mdconfig -r -u unit -s size [-o [no]force]\n"
" mdconfig -l [-v] [-n] [-u unit]\n"
" mdconfig file\n");
- fprintf(stderr, "\t\ttype = {malloc, preload, vnode, swap}\n");
+ fprintf(stderr, "\t\ttype = {malloc, vnode, swap}\n");
fprintf(stderr, "\t\toption = {cluster, compress, reserve}\n");
fprintf(stderr, "\t\tsize = %%d (512 byte blocks), %%db (B),\n");
fprintf(stderr, "\t\t %%dk (kB), %%dm (MB), %%dg (GB) or\n");
@@ -148,8 +148,6 @@ main(int argc, char **argv)
if (!strcmp(optarg, "malloc")) {
mdio.md_type = MD_MALLOC;
mdio.md_options |= MD_AUTOUNIT | MD_COMPRESS;
- } else if (!strcmp(optarg, "preload")) {
- mdio.md_type = MD_PRELOAD;
} else if (!strcmp(optarg, "vnode")) {
mdio.md_type = MD_VNODE;
mdio.md_options |= MD_CLUSTER | MD_AUTOUNIT | MD_COMPRESS;