This patch strips off 8 bytes from text section. Not a really
big advantage (especially for __init section). It seems 8192
bytes of disassembled code is rare used anyway.
before:
text data bss dec hex filename
9900 176 20 10096 2770 arch/x86/kernel/traps_64.o.old
after:
text data bss dec hex filename
9892 176 20 10088 2768 arch/x86/kernel/traps_64.o
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
---
If there is no benefit at all - just drop the patch.
Any comments are welcome ;)
Index: linux-2.6.git/arch/x86/kernel/traps_32.c
===================================================================
--- linux-2.6.git.orig/arch/x86/kernel/traps_32.c 2008-02-02 23:52:16.000000000 +0300
+++ linux-2.6.git/arch/x86/kernel/traps_32.c 2008-02-03 00:39:58.000000000 +0300
@@ -1229,8 +1229,9 @@ __setup("kstack=", kstack_setup);
static int __init code_bytes_setup(char *s)
{
code_bytes = simple_strtoul(s, NULL, 0);
- if (code_bytes > 8192)
- code_bytes = 8192;
+
+ /* we don't want too long code-dump */
+ code_bytes &= 8191;
return 1;
}
Index: linux-2.6.git/arch/x86/kernel/traps_64.c
===================================================================
--- linux-2.6.git.orig/arch/x86/kernel/traps_64.c 2008-02-02 23:52:16.000000000 +0300
+++ linux-2.6.git/arch/x86/kernel/traps_64.c 2008-02-03 00:38:10.000000000 +0300
@@ -1196,8 +1196,9 @@ early_param("kstack", kstack_setup);
static int __init code_bytes_setup(char *s)
{
code_bytes = simple_strtoul(s, NULL, 0);
- if (code_bytes > 8192)
- code_bytes = 8192;
+
+ /* we don't want too long code-dump */
+ code_bytes &= 8191;
return 1;
}
--
| Greg Kroah-Hartman | [PATCH 002/196] Chinese: rephrase English introduction in HOWTO |
| Tarkan Erimer | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Amit K. Arora | [RFC] Heads up on sys_fallocate() |
| Linus Torvalds | Re: 2.6.25-rc2 System no longer powers off after suspend-to-disk. Screen becomes g... |
git: | |
| David Miller | [GIT]: Networking |
| Jarek Poplawski | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| Ray Lee | Re: [BUG] New Kernel Bugs |
