large frame size warning when compiling

Valdis.Kletnieks at vt.edu Valdis.Kletnieks at vt.edu
Thu May 8 11:46:43 EDT 2014


On Thu, 08 May 2014 09:24:38 +0530, Jay Aurabind said:
> > Allocating 1K on the stack is indeed evil.
>
> Why would you say evil ? I didnt quite get why you meant by that. Is it
> at some extremes ? 1K is from the default ubuntu 14.04 config.

Some paths in the kernel get very deep stacks (for instance, nfs reading
an xfs file that's on an lvm partition on a dm-crypt target is famous for
blowing the stack without any further help).  On my laptop, the low-water
mark is already pretty low:

% dmesg | grep 'stack depth'
[    2.094319] cryptomgr_test (42) used greatest stack depth: 6456 bytes left
[    2.952135] modprobe (91) used greatest stack depth: 5904 bytes left
[    2.955593] modprobe (93) used greatest stack depth: 5848 bytes left
[    2.955953] cryptomgr_probe (94) used greatest stack depth: 5520 bytes left
[    4.145573] systemd-cgroups (135) used greatest stack depth: 5440 bytes left
[    4.859260] udevadm (255) used greatest stack depth: 4920 bytes left
[    4.966646] ata_id (268) used greatest stack depth: 4088 bytes left
[  145.528777] dhclient (1306) used greatest stack depth: 4072 bytes left
[  226.188576] ip (2232) used greatest stack depth: 3344 bytes left
[  300.303981] ip (2468) used greatest stack depth: 3152 bytes left

So in the first 5 minutes, I already was down to 3K of stack. All it takes
is that code interacting with another code that allocates 1K popping when I
was at that 3K low water mark, and my kernel is in deep juju.

The fact the 1K is in the default Ubuntu config just means that the kernel as
distributed has bad code in it. :)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 848 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20140508/bea0e8aa/attachment.bin 


More information about the Kernelnewbies mailing list