Re: what's parisc execve_wrapper doing in the end?

James Bottomley
2012-10-09T09:55:21Z

On Mon, 2012-10-08 at 12:28 +0100, James Bottomley wrote:
> Even with the patch applied, it's hanging on boot around the first
> kthread spawns. I'm investigating.

Actually an obvious fix: you can't set up ksp and then zero the
registers.

I note that the stack frame you're creating is too big since
THREAD_SZ_ALGN includes space for a stack frame by design so adding
another one is redundant. However, this confusion seems to permeate the
syscall code as well, so perhaps fixing it up later is better.

With this patch applied, I can now boot up successfully to a login
prompt.

James

---

diff --git a/arch/parisc/kernel/process.c b/arch/parisc/kernel/process.c
index 61113c3..38db36f 100644
--- a/arch/parisc/kernel/process.c
+++ b/arch/parisc/kernel/process.c
@@ -254,8 +254,6 @@ copy_thread(unsigned long clone_flags, unsigned long usp,
#ifdef CONFIG_HPUX
extern void * const hpux_child_return;
#endif
- cregs->ksp = (unsigned long)stack + THREAD_SZ_ALGN + FRAME_SIZE;