lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Mon, 18 Jul 2011 14:44:06 -0500
From:	James Bottomley <James.Bottomley@...senPartnership.com>
To:	Pekka Enberg <penberg@...nel.org>
Cc:	Michael Tokarev <mjt@....msk.ru>,
	Sasha Levin <levinsasha928@...il.com>,
	linux-kernel@...r.kernel.org, kvm@...r.kernel.org,
	Avi Kivity <avi@...hat.com>, Ingo Molnar <mingo@...e.hu>,
	linux-fsdevel@...r.kernel.org
Subject: Re: [PATCH] init: Support mounting devices from kernel command line

On Mon, 2011-07-18 at 15:27 +0300, Pekka Enberg wrote:
> On Mon, Jul 18, 2011 at 3:15 PM, Michael Tokarev <mjt@....msk.ru> wrote:
> >>> In /tools/kvm we are interested in such feature to allow us to automatically
> >>> mount user home directory using virtio-9p from the host to the guest
> >>> filesystem under '/hostfs'.
> >
> > Can't the same be done within initramfs just as easy?
> >
> > Long time ago when initramfs first appeared the plan was to,
> > more or less, move all that mounting and root= handling
> > functionality to userspae, and here we're adding more
> > to kernel.  To me that sounds backwards...
> 
> Well, we can currently boot distro images using custom kernel combined
> with distro initramfs. I'm not sure how we can inject our mount point
> to initramfs as easily.

Actually, I think it can.  An initramfs is designed as an effective root
booting system that runs from /sbin/init, does it's stuff like driver
loading and device finding, mounts the real root and pivots to it before
executing /sbin/init.

It strikes me, therefore, that it's fairly easy to insert another initrd
at the beginning of that process, so you alter the kernel to boot with
virt_initrd as the initramfs.  It would prepare all your mount points
(or muck with the parameters so they'd get mounted by the next initrd)
and load any virt drivers, then take the next initrd into a tempfs,
pivot to it and exec /sbin/init.

That would seem to work without needing any kernel patches at all.

James

> I don't think it's backwards progress but then again, I don't really
> use initramfs or modules for that matter so maybe I'm just old
> fashioned.


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ