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:	Mon, 18 Feb 2008 06:12:14 +0100
From:	Ingo Molnar <mingo@...e.hu>
To:	Arnaldo Carvalho de Melo <acme@...hat.com>,
	linux-kernel@...r.kernel.org
Subject: Re: Reducing debuginfo size by removing unneeded includes


* Arnaldo Carvalho de Melo <acme@...hat.com> wrote:

> 	So I'll try to improve automation to find more of these cases.
> 
> 	Here goes the first patch, regards.

randconfig testing found the attached config that fails to build:

arch/x86/ia32/sys_ia32.c: In function 'sys32_gettimeofday':
arch/x86/ia32/sys_ia32.c:447: error: 'sys_tz' undeclared (first use in this function)
arch/x86/ia32/sys_ia32.c:447: error: (Each undeclared identifier is reported only once
arch/x86/ia32/sys_ia32.c:447: error: for each function it appears in.)

adding vgtod.h solved this problem. Updated patch below.

	Ingo

------------->
Subject: x86: reducing debuginfo size by removing unneeded includes
From: Arnaldo Carvalho de Melo <acme@...hat.com>
Date: Thu, 7 Feb 2008 21:03:04 -0200

	I'm starting with you because the first file I used to
experiment with this idea was arch/x86/ia32/sys_ia32.c.

	I found it strange that the struct sk_buff definition was found
inside the DWARF debugging sections in the generated object, so I verified
and found that there is no need for the files that bring struct sk_buff
definition into this file and verified also that sk_buff is not brought
in indirectly too, thru other headers.

	I went on and removed many other unneeded includes and the end
result is:

[acme@...pio net-2.6]$ l /tmp/sys_ia32.o.before /tmp/sys_ia32.o.after
-rw-rw-r-- 1 acme acme 185240 2008-02-06 19:19 /tmp/sys_ia32.o.after
-rw-rw-r-- 1 acme acme 248328 2008-02-06 19:00 /tmp/sys_ia32.o.before

	Almost 64KB only on this object file!

	There were no other side effects from this change:

[acme@...pio net-2.6]$ objcopy -j "text" /tmp/sys_ia32.o.before /tmp/text.before
[acme@...pio net-2.6]$ objcopy -j "text" /tmp/sys_ia32.o.after /tmp/text.after
[acme@...pio net-2.6]$ md5sum /tmp/text.before /tmp/text.after
b7ac9b17942add68494e698e4f965d36  /tmp/text.before
b7ac9b17942add68494e698e4f965d36  /tmp/text.after

	One of the complaints about using tools such as systemtap is
that one has to install the huge kernel-debuginfo package:

[acme@...pio net-2.6]$ rpm -q --qf "%{size}\n" kernel-rt-debuginfo
471737710
543867594
[acme@...pio net-2.6]$

Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
Signed-off-by: Ingo Molnar <mingo@...e.hu>
---
 arch/x86/ia32/sys_ia32.c |   26 +-------------------------
 1 file changed, 1 insertion(+), 25 deletions(-)

Index: linux-x86.q/arch/x86/ia32/sys_ia32.c
===================================================================
--- linux-x86.q.orig/arch/x86/ia32/sys_ia32.c
+++ linux-x86.q/arch/x86/ia32/sys_ia32.c
@@ -26,51 +26,27 @@
 #include <linux/file.h>
 #include <linux/signal.h>
 #include <linux/syscalls.h>
-#include <linux/resource.h>
 #include <linux/times.h>
 #include <linux/utsname.h>
-#include <linux/smp.h>
 #include <linux/smp_lock.h>
-#include <linux/sem.h>
-#include <linux/msg.h>
 #include <linux/mm.h>
-#include <linux/shm.h>
-#include <linux/slab.h>
 #include <linux/uio.h>
-#include <linux/nfs_fs.h>
-#include <linux/quota.h>
-#include <linux/module.h>
-#include <linux/sunrpc/svc.h>
-#include <linux/nfsd/nfsd.h>
-#include <linux/nfsd/cache.h>
-#include <linux/nfsd/xdr.h>
-#include <linux/nfsd/syscall.h>
 #include <linux/poll.h>
 #include <linux/personality.h>
 #include <linux/stat.h>
-#include <linux/ipc.h>
 #include <linux/rwsem.h>
-#include <linux/binfmts.h>
-#include <linux/init.h>
-#include <linux/aio_abi.h>
-#include <linux/aio.h>
 #include <linux/compat.h>
 #include <linux/vfs.h>
 #include <linux/ptrace.h>
 #include <linux/highuid.h>
-#include <linux/vmalloc.h>
-#include <linux/fsnotify.h>
 #include <linux/sysctl.h>
 #include <asm/mman.h>
 #include <asm/types.h>
 #include <asm/uaccess.h>
 #include <asm/semaphore.h>
 #include <asm/atomic.h>
-#include <asm/ldt.h>
-
-#include <net/scm.h>
-#include <net/sock.h>
 #include <asm/ia32.h>
+#include <asm/vgtod.h>
 
 #define AA(__x)		((unsigned long)(__x))
 

View attachment "config" of type "text/plain" (56538 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ