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]
Date:   Sun, 22 Apr 2018 22:52:08 +0200
From:   Pavel Machek <pavel@....cz>
To:     Paul Menzel <pmenzel+linux-kernel@...gen.mpg.de>
Cc:     linux-kernel@...r.kernel.org, x86@...nel.org,
        Ingo Molnar <mingo@...nel.org>
Subject: Re: How to disable Linux kernel self-extraction (KERNEL_GZIP, KERNEL_BZIP2, …)?

Hi!

> >>I try to decrease boot time, and my system has an SSD and enough space, so
> >>loading 18 instead of 12 MB doesn’t make a difference, but the
> >>self-extraction is noticeable. So, I like to disable it.
> >
> >How long does GZIP extraction take on your hardware?
> 
> It’s hard to measure – at least I didn’t find a way to do so –, but counting
> from the last GRUB message to the first message of Linux (with `quiet`
> removed from the the command line), it takes roughly *two* seconds.
> 
> ```
> $ ls -l /boot/vmlinuz-4.15.0-3-686-pae
> -rw-r--r-- 1 root root  3987200 Apr 19 12:13 /boot/vmlinuz-4.15.0-3-686-pae
> $ ls -lh /boot/vmlinuz-4.15.0-3-686-pae
> -rw-r--r-- 1 root root 3,9M Apr 19 12:13 /boot/vmlinuz-4.15.0-3-686-pae
> $ time scripts/extract-vmlinux vmlinuz-4.15.0-3-686-pae > bla.txt
> 
> real    0m1,204s
> user    0m1,041s
> sys     0m0,245s
> ```

Interesting; looks like I have faster machine (thinkpad X220).

pavel@duo:/data/l/linux$ time scripts/extract-vmlinux /tmp/vmlinux.bin
> /tmp/delme
0.21user 0.15system 0.66 (0m0.660s) elapsed 56.36%CPU
pavel@duo:/data/l/linux$ ls -al /tmp/delme
-rw-r--r-- 1 pavel pavel 18275356 Apr 22 22:44 /tmp/delme
pavel@duo:/data/l/linux$ gzip /tmp/delme
pavel@duo:/data/l/linux$ time gzip -d /tmp/delme.gz
0.21user 0.02system 0.23 (0m0.232s) elapsed 100.03%CPU
pavel@duo:/data/l/linux$ gzip -1 /tmp/delme
pavel@duo:/data/l/linux$ time gzip -d /tmp/delme.gz
0.22user 0.03system 0.25 (0m0.257s) elapsed 100.11%CPU
pavel@duo:/data/l/linux$ time gzip -d /tmp/delme.gz

..and it also looks like extract-kernel is significantly slower than
gzip -9, because it is not using all the CPU. Strange.

Interesting. I somehow assumed gzip -d would be faster than that on
modern machines.

So yes, looks like uncompressed kernel image may be good idea.
									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

Download attachment "signature.asc" of type "application/pgp-signature" (182 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ