Bug 184183 - FC4 stock kernel modified "stack size"??
Summary: FC4 stock kernel modified "stack size"??
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel   
(Show other bugs)
Version: 4
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Dave Jones
QA Contact: Brian Brock
Depends On:
TreeView+ depends on / blocked
Reported: 2006-03-07 00:44 UTC by Robinson Tiemuqinke
Modified: 2015-01-04 22:25 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-05-27 04:38:13 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description Robinson Tiemuqinke 2006-03-07 00:44:25 UTC
Description of problem:

FC4 stock kernel modified "stack size" from  default "8M" to "10M"

Version-Release number of selected component (if applicable):


How reproducible:
Every time, Just want to know the redhat patch or trick to adjust the default 
stack size.

Steps to Reproduce:
1. run "uname -a; ulimit -HSa | grep 'stack size' ", it shows 10240KB "stack 
2. compile and install a 2.6.15 vanilla kernel
3. run "uname -a; ulimit -HSa | grep 'stack size' ", it shows 8192K instead. 

Actual results:

edhat stock kernel for FC4:

[root@testnode01 ~]# uname -a; ulimit -a | grep stack Linux 
testnode01.example.com 2.6.15-1.1831_FC4smp #1 SMP Tue Feb 7 13:51:52 EST 2006 
x86_64 x86_64 x86_64 GNU/Linux
stack size              (kbytes, -s) 10240

newly compiled vanilla kernel:

[root@testnode01 ~]# uname -a ; ulimit -HSa | grep stack Linux 
testnode01.example.com #4 SMP Mon Mar 6 14:39:14 PST 2006 x86_64 
x86_64 x86_64 GNU/Linux
stack size              (kbytes, -s) 8192

Expected results:

either 10240KB or 8192KB are OK, but would like to know which patch, or 
compilation options|steps making the difference from vanilla kernel, and the 
reasons behind if possible.


Additional info:

Comment 1 Dave Jones 2006-03-07 04:28:22 UTC
it's done as part of linux-2.6-execshield.patch

--- linux.orig/include/linux/resource.h
+++ linux/include/linux/resource.h
@@ -52,8 +52,11 @@ struct rlimit {
  * Limit the stack by to some sane default: root can always
  * increase this limit if needed..  8MB seems reasonable.
+ *
+ * (2MB more to cover randomization effects.)
-#define _STK_LIM   (8*1024*1024)
+#define _STK_LIM   (10*1024*1024)
+#define EXEC_STACK_BIAS    (2*1024*1024)

I forget the reasoning why, I'll try and dig up the history.

Comment 2 Dave Jones 2006-05-27 04:38:13 UTC
The randomization 'consumes' stack-space, and we randomize both the stack and
the stack top (argv/exec area), which makes the worst-case loss of stack-space 2MB.

Note You need to log in before you can comment on or make changes to this bug.