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]
Message-ID:
 <4b6434f738cdf10b6622b3d4f0987e29b0175da4.camel@cyberus-technology.de>
Date: Sat, 22 Mar 2025 18:23:39 +0000
From: Julian Stecklina <julian.stecklina@...erus-technology.de>
To: "hch@....de" <hch@....de>
CC: "torvalds@...ux-foundation.org" <torvalds@...ux-foundation.org>,
	"gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
	"rafael@...nel.org" <rafael@...nel.org>, "viro@...iv.linux.org.uk"
	<viro@...iv.linux.org.uk>, "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>, "linux-fsdevel@...r.kernel.org"
	<linux-fsdevel@...r.kernel.org>
Subject: Re: [PATCH RFC] initrd: resize /dev/ram as needed

Hi Christoph,

On Fri, 2025-03-21 at 06:01 +0100, Christoph Hellwig wrote:
> On Thu, Mar 20, 2025 at 08:46:14PM +0100, Julian Stecklina via B4 Relay wrote:
> > From: Julian Stecklina <julian.stecklina@...erus-technology.de>
> > 
> > When the initrd doesn't fit into the RAM disk, we currently just die.
> > This is unfortunate, because users have to manually configure the RAM
> > disk size for no good reason. It also means that the kernel command
> > line needs to be changed for different initrds, which is sometimes
> > cumbersome.
> > 
> > Attempt resizing /dev/ram to fit the RAM disk size instead. This makes
> > initrd images work a bit more like initramfs images in that they just
> > work.
> > 
> > Of course, this only works, because we know that /dev/ram is a RAM
> > disk and we can resize it freely. I'm not sure whether I've used the
> > blockdev APIs here in a sane way. If not, please advise!
> 
> Just use an initramfs and avoid all these problems.
> 

Well, as Gao Xiang put it in the other mail: CPIO is somewhat inflexible. So
here we are. :)

That being said, I saw that the RAM disk code allocates memory on demand, so
there is no downsize to set the default size to 1G and not bother with resizing
it. Problem solved! Patch not needed.

Julian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ