From: "Alan D. Brunelle" <Alan.Brunelle@hp.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Kernel Testers List <kernel-testers@vger.kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Arjan van de Ven <arjan@linux.intel.com>,
Rusty Russell <rusty@rustcorp.com.au>
Subject: Re: [Bug #11342] Linux 2.6.27-rc3: kernel BUG at mm/vmalloc.c - bisected
Date: Mon, 25 Aug 2008 16:19:44 -0400 [thread overview]
Message-ID: <48B313E0.1000501@hp.com> (raw)
In-Reply-To: <alpine.LFD.1.10.0808251106270.3363@nehalem.linux-foundation.org>
Linus Torvalds wrote:
>
> On Mon, 25 Aug 2008, Linus Torvalds wrote:
>> Could you make your kernel image available somewhere, and we can take a
>> look at it? Some versions of gcc are total pigs when it comes to stack
>> usage, and your exact configuration matters too. But yes, module loading
>> is a bad case, for me "sys_init_module()" contains
>>
>> subq $392, %rsp #,
>>
>> which is probably mostly because of the insane inlining gcc does (ie it
>> will likely have inlined every single function in that file that is only
>> called once, and then it will make all local variables of all those
>> functions alive over the whole function and allocate stack-space for them
>> ALL AT THE SAME TIME).
Mine has:
Dump of assembler code for function sys_init_module:
0xffffffff802688c0 <sys_init_module+0>: push %rbp
0xffffffff802688c1 <sys_init_module+1>: mov %rsp,%rbp
0xffffffff802688c4 <sys_init_module+4>: sub $0x1c0,%rsp
0xffffffff802688cb <sys_init_module+11>: mov %r12,-0x20(%rbp)
0xffffffff802688cf <sys_init_module+15>: mov %rdi,%r12
so 448 bytes.
The kernel is up at: http://free.linux.hp.com/~adb/bug.11342/vmlinux (if
you would let me know when you are through with it so I can free up some
space there I'd appreciate it...)
By doing the patch you provided, sys_init_module now looks like:
Dump of assembler code for function sys_init_module:
0xffffffff8026aa20 <sys_init_module+0>: push %rbp
0xffffffff8026aa21 <sys_init_module+1>: mov %rsp,%rbp
0xffffffff8026aa24 <sys_init_module+4>: sub $0x20,%rsp
0xffffffff8026aa28 <sys_init_module+8>: mov %r14,0x18(%rsp)
0xffffffff8026aa2d <sys_init_module+13>: mov %rdi,%r14
So only 32 bytes. (But of course, load_module() exists, and now has
0x1d0 (464) bytes...)
With the patch you provide, I /was/ able to repeatedly boot OK (latest
tree, and I also ran the patch against the 26.27.rc3-based kernel I was
having problems with initially, and that booted OK as well).
Alan
>
> I bet this one-liner will probably make your kernel work. It's not a full
> solution, but it will make the module-loading path lose _all_ of the above
> stack slots by just not inlining "load_module()" - the stack slots will
> still be used when the module is _loaded_, but by the time we actually
> callt he ->init function they will have been released since it's not all
> in the same crazy function any more.
>
> I _seriously_ believe that we were better off back when gcc only inlined
> what we told it to inline, and never inlined on its own. The gcc inlining
> logic is pure and utter sh*t in an environment like the kernel where stack
> space is a valuable resource.
>
> Anyway, Alan, even if this solves your particular problem, I'd still like
> to see your kernel image, so that I can hunt for other problems like
> this..
>
> Linus
>
> ---
> kernel/module.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/kernel/module.c b/kernel/module.c
> index 08864d2..9db1191 100644
> --- a/kernel/module.c
> +++ b/kernel/module.c
> @@ -1799,7 +1799,7 @@ static void *module_alloc_update_bounds(unsigned long size)
>
> /* Allocate and load the module: note that size of section 0 is always
> zero, and we rely on this for optional sections. */
> -static struct module *load_module(void __user *umod,
> +static noinline struct module *load_module(void __user *umod,
> unsigned long len,
> const char __user *uargs)
> {
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
next prev parent reply other threads:[~2008-08-25 20:20 UTC|newest]
Thread overview: 222+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-23 18:07 2.6.27-rc4-git1: Reported regressions from 2.6.26 Rafael J. Wysocki
2008-08-23 18:07 ` [Bug #11141] no battery or DC status - Dell i1501 Rafael J. Wysocki
2008-08-23 18:10 ` [Bug #11207] VolanoMark regression with 2.6.27-rc1 Rafael J. Wysocki
2008-08-23 18:10 ` [Bug #11191] 2.6.26-git8: spinlock lockup in c1e_idle() Rafael J. Wysocki
2008-08-23 18:10 ` [Bug #11210] libata badness Rafael J. Wysocki
2008-08-23 22:23 ` Jeff Garzik
2008-08-24 21:04 ` Rafael J. Wysocki
2008-08-23 18:10 ` [Bug #11209] 2.6.27-rc1 process time accounting Rafael J. Wysocki
2008-08-23 18:10 ` [Bug #11215] INFO: possible recursive locking detected ps2_command Rafael J. Wysocki
2008-08-23 18:10 ` [Bug #11219] KVM modules break emergency reboot Rafael J. Wysocki
2008-08-23 18:10 ` [Bug #11220] Screen stays black after resume Rafael J. Wysocki
2008-08-23 18:10 ` [Bug #11224] Only three cores found on quad-core machine Rafael J. Wysocki
2008-08-23 18:10 ` [Bug #11230] Kconfig no longer outputs a .config with freshly updated defconfigs Rafael J. Wysocki
2008-08-23 18:10 ` [Bug #11237] corrupt PMD after resume Rafael J. Wysocki
2008-08-23 18:10 ` [Bug #11271] BUG: fealnx in 2.6.27-rc1 Rafael J. Wysocki
2008-08-23 22:26 ` Jeff Garzik
2008-08-23 18:10 ` [Bug #11264] Invalid op opcode in kernel/workqueue Rafael J. Wysocki
2008-08-23 18:10 ` [Bug #11254] KVM: fix userspace ABI breakage Rafael J. Wysocki
2008-08-24 19:27 ` Adrian Bunk
2008-08-25 10:23 ` Avi Kivity
2008-08-23 18:10 ` [Bug #11276] build error: CONFIG_OPTIMIZE_INLINING=y causes gcc 4.2 to do stupid things Rafael J. Wysocki
2008-08-23 18:10 ` [Bug #11282] Please fix x86 defconfig regression Rafael J. Wysocki
2008-08-23 18:10 ` [Bug #11279] 2.6.27-rc0 Power Bugs with HP/Compaq Laptops Rafael J. Wysocki
2008-08-23 18:10 ` [Bug #11272] BUG: parport_serial in 2.6.27-rc1 for NetMos Technology PCI 9835 Rafael J. Wysocki
2008-08-23 18:10 ` [Bug #11335] 2.6.27-rc2-git5 BUG: unable to handle kernel paging request Rafael J. Wysocki
2008-08-23 18:10 ` [Bug #11334] myri10ge: use ioremap_wc: compilation failure on ARM Rafael J. Wysocki
2008-08-24 12:26 ` Martin Michlmayr
2008-08-24 21:05 ` Rafael J. Wysocki
2008-08-23 18:10 ` [Bug #11308] tbench regression on each kernel release from 2.6.22 -> 2.6.28 Rafael J. Wysocki
2008-08-23 18:10 ` [Bug #11336] 2.6.27-rc2:stall while mounting root fs Rafael J. Wysocki
2008-08-23 18:10 ` [Bug #11342] Linux 2.6.27-rc3: kernel BUG at mm/vmalloc.c - bisected Rafael J. Wysocki
2008-08-23 20:10 ` Linus Torvalds
2008-08-23 20:15 ` Arjan van de Ven
2008-08-25 12:07 ` Alan D. Brunelle
2008-08-23 20:17 ` Linus Torvalds
2008-08-25 12:03 ` Alan D. Brunelle
2008-08-25 12:22 ` Alan D. Brunelle
2008-08-25 18:00 ` Linus Torvalds
2008-08-25 18:09 ` Linus Torvalds
2008-08-25 20:19 ` Alan D. Brunelle [this message]
2008-08-25 20:43 ` Linus Torvalds
2008-08-25 20:45 ` Arjan van de Ven
2008-08-25 20:52 ` Linus Torvalds
2008-08-25 21:15 ` Linus Torvalds
2008-08-26 7:22 ` Ingo Molnar
2008-08-26 7:46 ` David Miller
2008-08-26 7:53 ` Ingo Molnar
2008-08-26 8:36 ` Yinghai Lu
2008-08-26 16:51 ` Linus Torvalds
2008-08-26 17:08 ` Yinghai Lu
2008-09-25 1:50 ` Rusty Russell
2008-09-25 8:55 ` Ingo Molnar
2008-09-25 15:42 ` Linus Torvalds
2008-09-25 20:59 ` Subject: [RFC 1/1] cpumask: Provide new cpumask API Mike Travis
2008-09-26 5:25 ` [Bug #11342] Linux 2.6.27-rc3: kernel BUG at mm/vmalloc.c - bisected Rusty Russell
2008-09-26 5:53 ` Mike Travis
2008-09-27 19:16 ` Ingo Molnar
2008-09-29 14:33 ` Mike Travis
2008-09-30 11:04 ` Ingo Molnar
2008-09-30 16:14 ` Mike Travis
2008-09-30 16:46 ` Linus Torvalds
2008-09-30 18:02 ` Mike Travis
2008-09-30 22:22 ` [RFC 1/1] cpumask: New cpumask API - take 2 - use unsigned longs Mike Travis
2008-10-01 0:45 ` Rusty Russell
2008-10-01 0:44 ` [Bug #11342] Linux 2.6.27-rc3: kernel BUG at mm/vmalloc.c - bisected Rusty Russell
2008-08-26 19:11 ` Mike Travis
2008-08-26 19:06 ` Mike Travis
2008-08-26 20:45 ` David Miller
2008-08-29 12:42 ` Jes Sorensen
2008-08-29 16:14 ` Linus Torvalds
2008-08-29 20:04 ` David Miller
2008-09-01 11:53 ` Jes Sorensen
2008-09-02 14:27 ` Jes Sorensen
2008-08-26 19:03 ` Mike Travis
2008-08-26 19:40 ` Linus Torvalds
2008-08-26 19:01 ` Mike Travis
2008-08-26 19:09 ` Linus Torvalds
2008-08-26 19:28 ` Dave Jones
2008-08-26 20:01 ` Mike Travis
2008-08-27 6:54 ` Nick Piggin
2008-08-27 7:05 ` David Miller
2008-08-27 7:47 ` Nick Piggin
2008-08-27 8:44 ` David Miller
2008-08-27 14:48 ` Mike Travis
2008-08-27 14:36 ` Mike Travis
2008-08-27 14:35 ` Mike Travis
2008-08-26 19:35 ` Mike Travis
2008-08-25 21:30 ` Alan D. Brunelle
2008-08-25 22:07 ` Christoph Lameter
2008-08-26 7:59 ` Ingo Molnar
2008-08-26 19:48 ` Mike Travis
2008-08-26 1:11 ` Rusty Russell
2008-08-26 17:35 ` Linus Torvalds
2008-08-26 18:30 ` Adrian Bunk
2008-08-26 18:40 ` Linus Torvalds
2008-08-26 20:21 ` Adrian Bunk
2008-08-26 20:41 ` Linus Torvalds
2008-08-27 16:21 ` Jamie Lokier
2008-08-26 18:47 ` Linus Torvalds
2008-08-26 19:02 ` Jamie Lokier
2008-08-26 19:18 ` Linus Torvalds
2008-08-26 20:59 ` Adrian Bunk
2008-08-26 21:04 ` Linus Torvalds
2008-08-26 22:54 ` Parag Warudkar
2008-08-26 23:00 ` David VomLehn
2008-08-26 23:45 ` Adrian Bunk
2008-08-26 23:47 ` Linus Torvalds
2008-08-27 0:53 ` Greg Ungerer
2008-08-27 1:08 ` Parag Warudkar
2008-08-27 1:31 ` Greg Ungerer
2008-08-27 2:16 ` Parag Warudkar
2008-08-27 8:44 ` Bernd Petrovitsch
2008-08-27 0:58 ` Parag Warudkar
2008-08-27 1:49 ` Linus Torvalds
2008-08-27 2:36 ` Parag Warudkar
2008-08-27 2:52 ` Linus Torvalds
2008-08-27 8:32 ` Alan Cox
2008-08-27 6:01 ` Paul Mackerras
2008-08-27 10:58 ` Arjan van de Ven
2008-08-27 15:18 ` Linus Torvalds
2008-08-27 11:58 ` Adrian Bunk
2008-08-27 9:00 ` Bernd Petrovitsch
2008-08-27 12:56 ` Parag Warudkar
2008-08-27 13:17 ` Bernd Petrovitsch
2008-08-27 15:48 ` Jamie Lokier
2008-08-27 16:38 ` Bernd Petrovitsch
2008-08-27 17:51 ` Jamie Lokier
2008-08-27 19:30 ` Bernd Petrovitsch
2008-08-28 0:06 ` Greg Ungerer
2008-08-28 0:11 ` Greg Ungerer
2008-08-27 8:34 ` Bernd Petrovitsch
2008-08-26 23:24 ` Adrian Bunk
2008-08-26 23:51 ` Linus Torvalds
2008-08-27 0:23 ` Adrian Bunk
2008-08-27 0:28 ` Linus Torvalds
2008-08-27 11:58 ` Adrian Bunk
2008-08-27 16:00 ` Paul Mundt
2008-08-27 17:35 ` Adrian Bunk
2008-08-28 0:32 ` Paul Mundt
2008-08-28 0:46 ` David Miller
2008-08-28 1:02 ` Paul Mundt
2008-08-28 16:16 ` Adrian Bunk
2008-08-28 1:05 ` Greg Ungerer
2008-08-27 8:25 ` Alan Cox
2008-08-27 12:52 ` Parag Warudkar
2008-08-27 13:21 ` Alan Cox
2008-08-27 16:24 ` Parag Warudkar
2008-08-26 19:55 ` Jeff Garzik
2008-08-26 20:06 ` e1000 horridness (was Re: [Bug #11342] Linux 2.6.27-rc3: kernel BUG at mm/vmalloc.c - bisected) Linus Torvalds
2008-08-26 20:14 ` Kok, Auke
2008-08-26 22:04 ` Jeff Kirsher
2008-08-25 12:44 ` [Bug #11342] Linux 2.6.27-rc3: kernel BUG at mm/vmalloc.c - bisected Alan D. Brunelle
2008-08-25 13:13 ` Alan D. Brunelle
2008-08-25 18:02 ` Linus Torvalds
2008-08-25 14:05 ` Alan D. Brunelle
2008-08-23 18:10 ` [Bug #11340] LTP overnight run resulted in unusable box Rafael J. Wysocki
2008-08-23 18:10 ` [Bug #11343] SATA Cold Boot Problems with 2.6.27-rc[23] on nVidia 680i Rafael J. Wysocki
2008-08-23 22:34 ` Jeff Garzik
2008-08-23 18:10 ` [Bug #11354] AMD Elan regression with 2.6.27-rc3 Rafael J. Wysocki
2008-08-23 18:10 ` [Bug #11356] Linux 2.6.27-rc3 - build failure: undefined reference to `.lockdep_count_forward_deps' Rafael J. Wysocki
2008-08-24 6:13 ` Frans Pop
2008-08-24 21:10 ` Rafael J. Wysocki
2008-08-25 14:03 ` Adrian Bunk
2008-08-23 18:10 ` [Bug #11357] Can not boot up with zd1211rw USB-Wlan Stick Rafael J. Wysocki
2008-08-23 18:10 ` [Bug #11355] Regression in 2.6.27-rc2 when cross-building the kernel Rafael J. Wysocki
2008-08-24 21:34 ` Rafael J. Wysocki
2008-09-01 9:35 ` David Woodhouse
2008-09-01 16:51 ` Larry Finger
2008-09-01 17:37 ` David Woodhouse
2008-08-23 18:10 ` [Bug #11358] net: forcedeth call restore mac addr in nv_shutdown path Rafael J. Wysocki
2008-08-23 18:10 ` [Bug #11379] char/tpm: tpm_infineon no longer loaded for HP 2510p laptop Rafael J. Wysocki
2008-08-24 6:18 ` Frans Pop
2008-08-24 21:12 ` Rafael J. Wysocki
2008-08-23 18:10 ` [Bug #11380] lockdep warning: cpu_add_remove_lock at:cpu_maps_update_begin+0x14/0x16 Rafael J. Wysocki
2008-08-23 18:10 ` [Bug #11361] my servers with nvidia mcp55 nic don't work with msi in second kernel by kexec Rafael J. Wysocki
2008-08-23 18:10 ` [Bug #11360] mpc8xxx_wdt.c doesn't build modular Rafael J. Wysocki
2008-08-23 18:10 ` [Bug #11382] e1000e: 2.6.27-rc1 corrupts EEPROM/NVM Rafael J. Wysocki
2008-08-23 18:10 ` [Bug #11398] hda_intel: IRQ timing workaround is activated for card #0. Suggest a bigger bdl_pos_adj Rafael J. Wysocki
2008-08-23 18:10 ` [Bug #11401] pktcdvd: BUG, NULL pointer dereference in pkt_ioctl, bisected Rafael J. Wysocki
2008-08-23 18:10 ` [Bug #11388] 2.6.27-rc3 warns about MTRR range; only 3 of 16gb of memory is usable Rafael J. Wysocki
2008-08-23 18:10 ` [Bug #11406] patch "x86: MOVE PCI IO ECS code to x86/pci" breaks CPU hotplug Rafael J. Wysocki
2008-08-23 18:10 ` [Bug #11405] 2.6.27-rc3 segfault on cold boot; not on warm boot Rafael J. Wysocki
2008-08-23 18:10 ` [Bug #11403] 2.6.27-rc2 USB suspend regression Rafael J. Wysocki
2008-08-23 18:10 ` [Bug #11402] skbuff bug? Rafael J. Wysocki
2008-08-23 18:10 ` [Bug #11404] BUG: in 2.6.23-rc3-git7 in do_cciss_intr Rafael J. Wysocki
2008-08-23 18:10 ` [Bug #11413] get_rtc_time() triggers NMI watchdog in hpet_rtc_interrupt() Rafael J. Wysocki
2008-08-23 18:10 ` [Bug #11409] build issue #564 for v2.6.27-rc4 : undefined reference to `NS8390p_init' Rafael J. Wysocki
2008-08-23 18:10 ` [Bug #11407] suspend: unable to handle kernel paging request Rafael J. Wysocki
2008-08-23 18:10 ` [Bug #11410] SLUB list_lock vs obj_hash.lock Rafael J. Wysocki
2008-08-23 18:10 ` [Bug #11414] Random crashes with 2.6.27-rc3 on PPC Rafael J. Wysocki
2008-08-24 17:48 ` 2.6.27-rc4-git1: Reported regressions from 2.6.26 Linus Torvalds
2008-08-24 19:23 ` David Greaves
2008-08-25 0:51 ` Linus Torvalds
2008-08-24 18:03 ` Linus Torvalds
2008-08-24 18:43 ` Vegard Nossum
2008-08-24 18:58 ` Linus Torvalds
2008-08-25 13:03 ` Daniel J Blueman
2008-08-24 18:34 ` Linus Torvalds
2008-08-27 20:17 ` Peter Osterlund
2008-08-27 20:40 ` Linus Torvalds
2008-08-27 20:45 ` Linus Torvalds
2008-08-28 13:52 ` Christoph Hellwig
2008-09-02 7:26 ` Jens Axboe
2008-09-03 2:06 ` Al Viro
2008-09-04 10:13 ` Jens Axboe
2008-09-15 5:30 ` Al Viro
2008-08-27 22:08 ` Alan Cox
2008-08-27 22:38 ` Linus Torvalds
2008-08-27 22:28 ` Alan Cox
2008-08-27 23:00 ` Linus Torvalds
2008-08-27 23:12 ` Linus Torvalds
2008-08-28 0:35 ` Linus Torvalds
2008-08-27 22:43 ` David Miller
2008-08-27 22:45 ` Alexey Dobriyan
2008-08-24 18:52 ` Linus Torvalds
2008-08-24 22:50 ` Sean Young
2008-08-25 0:16 ` H. Peter Anvin
2008-08-24 19:03 ` Linus Torvalds
2008-08-24 19:23 ` Adrian Bunk
2008-08-24 21:40 ` Rafael J. Wysocki
2008-08-25 0:48 ` Benjamin Herrenschmidt
2008-08-25 11:40 ` Rafael J. Wysocki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=48B313E0.1000501@hp.com \
--to=alan.brunelle@hp.com \
--cc=akpm@linux-foundation.org \
--cc=arjan@linux.intel.com \
--cc=kernel-testers@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rjw@sisk.pl \
--cc=rusty@rustcorp.com.au \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox