Bug 184183 - FC4 stock kernel modified "stack size"??
FC4 stock kernel modified "stack size"??
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: kernel (Show other bugs)
4
All Linux
medium Severity medium
: ---
: ---
Assigned To: Dave Jones
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-03-06 19:44 EST by Robinson Tiemuqinke
Modified: 2015-01-04 17:25 EST (History)
2 users (show)

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


Attachments (Terms of Use)

  None (edit)
Description Robinson Tiemuqinke 2006-03-06 19:44:25 EST
Description of problem:

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

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

kernel-2.6.15-1.1831_FC4
kernel-2.6.15-1.1831_FC4smp

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 
size"
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 2.6.15.5 kernel:

[root@testnode01 ~]# uname -a ; ulimit -HSa | grep stack Linux 
testnode01.example.com 2.6.15.5_64GB #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.

Thanks.


Additional info:
Comment 1 Dave Jones 2006-03-06 23:28:22 EST
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 00:38:13 EDT
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.