Date: Thu, 10 Sep 2015 19:44:47 +0800 From: Erich Dollansky <erichsfreebsdlist@alogt.com> To: Quartz <quartz@sneakertech.com> Cc: freebsd-questions@freebsd.org Subject: Re: mdconfig creating file based memory disk Message-ID: <20150910194447.16168030@X220.alogt.com> In-Reply-To: <55F10CF5.5070409@sneakertech.com> References: <20150910111034.20b97c41@X220.alogt.com> <55F10CF5.5070409@sneakertech.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi, On Thu, 10 Sep 2015 00:54:13 -0400 Quartz <quartz@sneakertech.com> wrote: > > It gives me double the size of 'swapfile' as swap space. It is > > obvious to me that this must fail. > > Interestingly, I just tested this in a VM and it seems to work fine. > I maxed out the ram by creating a few other ramdisks and filling them > with dd zero files, and the most I got was a generic "out of swap > space" error (no crashes or panics). Not sure exactly what it's doing > though. fill it either with random data (hard to verify) or one with 0s and the other one with 1s. The data you write last should be on both disks afterwards. I did a simple test. I creates two memory disks using the same file, put a file system on, mounted one memory disk, wrote file to it, un-mounted it, mounted the other memory disk and the file was there. So, it is obvious that both memory disks are written to the one and only file without any warning. If this happens with swap, the damage can be whatever is possible with a corrupted swap. It even opens security holes if a normal user can either create memory disks or at least mount them. Erich -questions@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to > "freebsd-questions-unsubscribe@freebsd.org"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20150910194447.16168030>