Bug 62982 - clone2() call not allocating 16 byte scratch stack area
clone2() call not allocating 16 byte scratch stack area
Status: CLOSED WONTFIX
Product: Red Hat Linux
Classification: Retired
Component: kernel (Show other bugs)
7.2
ia64 Linux
medium Severity medium
: ---
: ---
Assigned To: Jason Baron
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-04-08 17:21 EDT by Jenna Hall
Modified: 2013-03-06 00:55 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-02-03 16:13:17 EST
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 Jenna Hall 2002-04-08 17:21:59 EDT
Description of Problem:
The clone2() call does not allocate a 16 byte scratch stack area when creating 
a new thread, as per IA-64 kernel calling convention.  Patch (see below) is in 
2.4.18 kernel, but Intel requests it be included in patch for upcoming ia64 
distro.


Version-Release number of selected component (if applicable):
IA-64 RH 7.2

How Reproducible:


Steps to Reproduce:
1. 
2. 
3. 

Actual Results:
Stack size passed is 16 bytes less than expected, as per kernel calling 
convention.

Expected Results:
Stack size passed includes 16 byte scratch area.

Additional Information:
Patch:

	
--- arch/ia64/kernel/entry.S~	Thu Jan 24 17:16:06 2002
+++ arch/ia64/kernel/entry.S	Sat Feb  9 10:41:59 2002
@@ -115,7 +115,7 @@
 	mov loc1=r16				// save ar.pfs across do_fork
 	.body
 	mov out1=in1
-	mov out3=0
+	mov out3=16				// stacksize (compensates for 
16-byte scratch area)
 	adds out2=IA64_SWITCH_STACK_SIZE+16,sp	// out2 = &regs
 	mov out0=in0				// out0 = clone_flags
 	br.call.sptk.many rp=do_fork
--- arch/ia64/ia32/ia32_entry.S~	Mon Nov 19 20:04:55 2001
+++ arch/ia64/ia32/ia32_entry.S	Sat Feb  9 10:41:41 2002
@@ -37,7 +37,7 @@
 	mov loc1=r16				// save ar.pfs across do_fork
 	.body
 	zxt4 out1=in1				// newsp
-	mov out3=0				// stacksize
+	mov out3=16				// stacksize (compensates for 
16-byte scratch area)
 	adds out2=IA64_SWITCH_STACK_SIZE+16,sp	// out2 = &regs
 	zxt4 out0=in0				// out0 = clone_flags
 	br.call.sptk.many rp=do_fork
--- arch/ia64/kernel/process.c~	Mon Feb  4 22:38:51 2002
+++ arch/ia64/kernel/process.c	Wed Feb  6 21:05:25 2002
@@ -267,7 +267,7 @@
 
 	if (user_mode(child_ptregs)) {
 		if (user_stack_base) {
-			child_ptregs->r12 = user_stack_base + user_stack_size;
+			child_ptregs->r12 = user_stack_base + user_stack_size - 
16;
 			child_ptregs->ar_bspstore = user_stack_base;
 			child_ptregs->ar_rnat = 0;
 			child_ptregs->loadrs = 0;
Comment 1 Jason Baron 2004-02-03 16:13:17 EST
this is 7.2 ia64 bug which is EOL. Closing bug.

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