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-next>] [day] [month] [year] [list]
Message-Id: <1234722028-8110-1-git-send-email-andr345@gmail.com>
Date:	Sun, 15 Feb 2009 19:20:22 +0100
From:	Andreas Robinson <andr345@...il.com>
To:	sam@...nborg.org, rusty@...tcorp.com.au
Cc:	linux-kernel@...r.kernel.org
Subject: [RFC PATCH 0/6] module, kbuild: Faster boot with custom kernel.

Hi guys,

as you know, systems with custom kernels boot faster, since they don't
need an initramfs or have to install modules. But, building a custom
kernel it is not really practical if you are releasing a distro, for
example.

This patchset aims to eventually solve that problem. It lets you link
external modules statically to the kernel and achive much the same
effect as changing the configuration and recompiling. You only need a
small part of a precompiled kernel tree (20-30MB, debug syms stripped)
and it's fast (15 seconds or less on an ordinary desktop PC).

Status: "Works for me", but has a bunch of TODOs (see below).
However, I hope you can comment on the bits that are done so far.

Thanks,
Andreas

Patches
-------

The patches are against 2.6.29-rc5.

The implementation is quite straightforward. I hope you think the commit
messages in the patches are clear enough.

TODOs
-----

- A makefile target that copies and prunes the tree to minimal
  size. Work in progress.

- Arch-specific changes to kbuild. X86 is done though still ugly so
  it is not included yet. I need to work some more on it first.

- Documentation.

- Proper testing.

How to use this thing in its current state
------------------------------------------

- Enable the new configuration option and build the kernel.
- Install and reboot.
- Collect the pathnames of the loaded modules in a text file
  in the order you want the kernel to initialize them.

  I use the this script. It is a bit slow, but works well
  enough.  (When I remember to run updatedb first.)

-------------8<---------------------------------- 
#!/bin/sh
k_ver="2.6.29-rc4"
for module in `tac /proc/modules`
do
        modname=`echo $module | cut -f 1 -d ' ' | sed -e s/[-_]/[-_]?/g`
        locate --regex /lib/modules/$k_ver/.*/$modname.ko
done
-------------8<----------------------------------

- Preprocess the modules named in the text file
  (called modules.lst here). Run from the kernel tree root:

  scripts/ld_extmodules.sh modules.lst output.o
  
- Relink the kernel:

  e.g make vmlinux L=1 EXTOBJ=output.o
  or 
  make bzImage L=1 EXTOBJ=output.o

- Install it.

- Move the linked modules from /lib/modules/*
  to some other location and run depmod.
  This has to be done so that udev won't try to
  insert them a second time.

- Enjoy.

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