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] [thread-next>] [day] [month] [year] [list]
Message-Id: <200607310003.48637.a1426z@gawab.com>
Date:	Mon, 31 Jul 2006 00:03:48 +0300
From:	Al Boldi <a1426z@...ab.com>
To:	"H. Peter Anvin" <hpa@...or.com>
Cc:	Rob Landley <rob@...dley.net>, linux-kernel@...r.kernel.org,
	torvalds@...l.org, stable@...nel.org, akpm@...l.org,
	chrisw@...s-sol.org, grim@...ead.cc,
	Hugh Dickins <hugh@...itas.com>
Subject: Re: [PATCH] initramfs:  Allow rootfs to use tmpfs instead of ramfs

H. Peter Anvin wrote:
> Hugh Dickins wrote:
> > On Sun, 30 Jul 2006, Al Boldi wrote:
> >> Replugs rootfs to use tmpfs instead of ramfs as a Kconfig option.
> >
> > Why?  Looking further down we see what you should have explained here:
> >> + This option switches rootfs so that it uses tmpfs rather than ramfs
> >> + for its file storage.  This makes rootfs swappable so having a large
> >> + initrd or initramfs image won't eat up valuable RAM.
> >
> > Now, I'm far from an expert on initramfs and early userspace, but my
> > understanding is that the "init" of a (properly designed) initramfs
> > would pretty much "rm -rf" everything in the initramfs before passing
> > control to the final "init".  So (almost?) no valuable RAM is eaten
> > up, nor the less valuable swap if you do extend this to tmpfs (unless
> > something gets left open, which I think should not be the case).
> >
> > So I'm inclined to say that this patch is simply unnecessary.  But
> > if people who know better think it's a good thing, I've no objection
> > (though I've not tried it): the Kconfiggery looks more likely to
> > provoke argument than the tmpfs/ramfs mods.
>
> Well...
>
> There is some justification: embedded people would like to load
> inittmpfs and then continue running.
>
> The main issue -- which I am not sure what effect this patch has -- is
> that we would really like to move initramfs initialization even earlier
> in the kernel, so that it can include firmware loading for built-in
> device drivers, for example.

I suspect, if there would be a problem with tmpfs, then ramfs would be no 
different.

> Thus, if this patch makes it harder to push initramfs initialization
> earlier, it's probably a bad thing.

Agreed, but remember that tmpfs is an option, not a replacement.

> If not, the author of the patch
> really needs to explain why it works and why it doesn't add new
> dependencies to the initialization order.
>
> Saying "this is a trivial patch" and pushing it on the -stable tree
> doesn't inspire too much confidence, as initialization is subtle.

Ok, I did play with main.c, and as you mentioned, initialization is subtle.  
But categorizing this patch as trivial is based more on the fact, that ramfs 
and tmpfs are semantically equivalent, and as such should not impose 
additional dependencies.


Thanks for your comments!

--
Al

-
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