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:	Sat, 22 Nov 2008 19:32:11 -0600
From:	Rob Landley <rob@...dley.net>
To:	frans <fransmeulenbroeks@...il.com>
Cc:	linux-kernel@...r.kernel.org, dwmw2@...radead.org
Subject: Re: [PATCH] create option to compress initramfs within the kernel

On Saturday 22 November 2008 11:30:13 frans wrote:
> Below is a patch to make compression of the initramfs image optional.
> Sumbitted to LKML as there is no MAINTAINER listed for initramfs.
>
> Rationale is that if you create a compressed kernel image (e.g. by
> make bzImage) it is not very efficient and useful to compress initramfs
> as the initramfs will be compressed anyway when the kernel image is
> compressed.

Actually it saves intermediate space (the cpio archive and the decompressed 
ramfs coexist during the decompression, until the kernel can free the cpio 
archive), so it does serve a purpose.  (Given cache effects leaving it 
compressed may actually wind up being faster on modern CPUs because it dirties 
fewer pages.)

It also eats CPU, which is at more of a premium than memory on some little 
battery powered wind-up boxes.  But I'd be happier seeing some actual 
benchmark numbers on a device that would actually _notice_ this change.

> @@ -257,6 +258,9 @@ while [ $# -gt 0 ]; do
>  			default_list="$arg"
>  			${dep_list}default_initramfs
>  			;;
> +		"-c")	# compress
> +			compress=1
> +			;;

You're changing the default behavior for people who run this script directly.  
Just FYI.

> --- a/usr/Kconfig
> +++ b/usr/Kconfig
> @@ -44,3 +44,14 @@ config INITRAMFS_ROOT_GID
>  	  owned by group root in the initial ramdisk image.
>
>  	  If you are not sure, leave it set to "0".
> +
> +config INITRAMFS_COMPRESS
> +	bool "Compress initramfs image"
> +	default y
> +	help
> +	  If you want a compressed initramfs image in your kernel say y
> +	  If you do not want your initramfs image to be compressed say n.
> +	  A compressed initramfs is generally not useful if you also have a
> +	  compressed kernel (vmlinuz, bzImage).

This should probably be in the CONFIG_EMBEDDED menu.

Rob
--
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