* [PATCH] proc: fix ->stack_start in compat mode
@ 2009-10-28 11:56 Alexey Dobriyan
2009-11-01 9:54 ` Stefani Seibold
0 siblings, 1 reply; 6+ messages in thread
From: Alexey Dobriyan @ 2009-10-28 11:56 UTC (permalink / raw)
To: akpm; +Cc: m.s.tsirkin, linux-kernel, stefani
Assign tsk->stack_start even when doing compat execve(2).
As side effect, fix segfault inside boehm-gc library.
http://bugzilla.kernel.org/show_bug.cgi?id=14478
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
---
Michael, please, confirm.
Stefani, I get "Stack usage: 0 kB", you may want to look at it.
fs/compat.c | 2 ++
1 file changed, 2 insertions(+)
--- a/fs/compat.c
+++ b/fs/compat.c
@@ -1532,6 +1532,8 @@ int compat_do_execve(char * filename,
if (retval < 0)
goto out;
+ current->stack_start = current->mm->start_stack;
+
/* execve succeeded */
current->fs->in_exec = 0;
current->in_execve = 0;
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] proc: fix ->stack_start in compat mode
2009-10-28 11:56 [PATCH] proc: fix ->stack_start in compat mode Alexey Dobriyan
@ 2009-11-01 9:54 ` Stefani Seibold
2009-11-01 10:21 ` Alexey Dobriyan
2009-11-01 12:43 ` Alexey Dobriyan
0 siblings, 2 replies; 6+ messages in thread
From: Stefani Seibold @ 2009-11-01 9:54 UTC (permalink / raw)
To: Alexey Dobriyan; +Cc: akpm, m.s.tsirkin, linux-kernel
Am Mittwoch, den 28.10.2009, 14:56 +0300 schrieb Alexey Dobriyan:
> Assign tsk->stack_start even when doing compat execve(2).
>
> As side effect, fix segfault inside boehm-gc library.
> http://bugzilla.kernel.org/show_bug.cgi?id=14478
>
> Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
> ---
>
> Michael, please, confirm.
>
> Stefani, I get "Stack usage: 0 kB", you may want to look at it.
>
Under which circumstance do you get 0 kb reported? What is your system
(mmu/nommu, 32bit/64bit, architecture and so on).
Stefani
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] proc: fix ->stack_start in compat mode
2009-11-01 9:54 ` Stefani Seibold
@ 2009-11-01 10:21 ` Alexey Dobriyan
2009-11-01 12:43 ` Alexey Dobriyan
1 sibling, 0 replies; 6+ messages in thread
From: Alexey Dobriyan @ 2009-11-01 10:21 UTC (permalink / raw)
To: Stefani Seibold; +Cc: akpm, m.s.tsirkin, linux-kernel
On Sun, Nov 01, 2009 at 10:54:05AM +0100, Stefani Seibold wrote:
> Am Mittwoch, den 28.10.2009, 14:56 +0300 schrieb Alexey Dobriyan:
> > Assign tsk->stack_start even when doing compat execve(2).
> >
> > As side effect, fix segfault inside boehm-gc library.
> > http://bugzilla.kernel.org/show_bug.cgi?id=14478
> >
> > Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
> > ---
> >
> > Michael, please, confirm.
> >
> > Stefani, I get "Stack usage: 0 kB", you may want to look at it.
> >
>
> Under which circumstance do you get 0 kb reported? What is your system
> (mmu/nommu, 32bit/64bit, architecture and so on).
i386 userpace, x86_64 kernel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] proc: fix ->stack_start in compat mode
2009-11-01 9:54 ` Stefani Seibold
2009-11-01 10:21 ` Alexey Dobriyan
@ 2009-11-01 12:43 ` Alexey Dobriyan
2009-11-01 14:42 ` Stefani Seibold
2009-11-01 15:06 ` Stefani Seibold
1 sibling, 2 replies; 6+ messages in thread
From: Alexey Dobriyan @ 2009-11-01 12:43 UTC (permalink / raw)
To: Stefani Seibold; +Cc: akpm, m.s.tsirkin, linux-kernel
On Sun, Nov 01, 2009 at 10:54:05AM +0100, Stefani Seibold wrote:
> Am Mittwoch, den 28.10.2009, 14:56 +0300 schrieb Alexey Dobriyan:
> > Assign tsk->stack_start even when doing compat execve(2).
> >
> > As side effect, fix segfault inside boehm-gc library.
> > http://bugzilla.kernel.org/show_bug.cgi?id=14478
> >
> > Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
> > ---
> >
> > Michael, please, confirm.
> >
> > Stefani, I get "Stack usage: 0 kB", you may want to look at it.
> >
>
> Under which circumstance do you get 0 kb reported? What is your system
> (mmu/nommu, 32bit/64bit, architecture and so on).
Well, no wonder it doesn't work:
#define KSTK_ESP(tsk) -1 /* sorry. doesn't work for syscall. */
How does it supposed to work on live task?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] proc: fix ->stack_start in compat mode
2009-11-01 12:43 ` Alexey Dobriyan
@ 2009-11-01 14:42 ` Stefani Seibold
2009-11-01 15:06 ` Stefani Seibold
1 sibling, 0 replies; 6+ messages in thread
From: Stefani Seibold @ 2009-11-01 14:42 UTC (permalink / raw)
To: Alexey Dobriyan; +Cc: akpm, m.s.tsirkin, linux-kernel
Am Sonntag, den 01.11.2009, 15:43 +0300 schrieb Alexey Dobriyan:
> On Sun, Nov 01, 2009 at 10:54:05AM +0100, Stefani Seibold wrote:
> > Am Mittwoch, den 28.10.2009, 14:56 +0300 schrieb Alexey Dobriyan:
> > > Assign tsk->stack_start even when doing compat execve(2).
> > >
> > > As side effect, fix segfault inside boehm-gc library.
> > > http://bugzilla.kernel.org/show_bug.cgi?id=14478
> > >
> > > Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
> > > ---
> > >
> > > Michael, please, confirm.
> > >
> > > Stefani, I get "Stack usage: 0 kB", you may want to look at it.
> > >
> >
> > Under which circumstance do you get 0 kb reported? What is your system
> > (mmu/nommu, 32bit/64bit, architecture and so on).
>
> Well, no wonder it doesn't work:
>
> #define KSTK_ESP(tsk) -1 /* sorry. doesn't work for syscall. */
>
> How does it supposed to work on live task?
Can you write it in a full sentence? Where did you located this define?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] proc: fix ->stack_start in compat mode
2009-11-01 12:43 ` Alexey Dobriyan
2009-11-01 14:42 ` Stefani Seibold
@ 2009-11-01 15:06 ` Stefani Seibold
1 sibling, 0 replies; 6+ messages in thread
From: Stefani Seibold @ 2009-11-01 15:06 UTC (permalink / raw)
To: Alexey Dobriyan; +Cc: akpm, m.s.tsirkin, linux-kernel
Am Sonntag, den 01.11.2009, 15:43 +0300 schrieb Alexey Dobriyan:
> > > Stefani, I get "Stack usage: 0 kB", you may want to look at it.
> > >
> >
> > Under which circumstance do you get 0 kb reported? What is your system
> > (mmu/nommu, 32bit/64bit, architecture and so on).
>
> Well, no wonder it doesn't work:
>
> #define KSTK_ESP(tsk) -1 /* sorry. doesn't work for syscall. */
>
> How does it supposed to work on live task?
Okay, you are right. That's really strange. I just build a 64 bit kernel
i will try to fix this odd behavior. This is a break in the kernel API.
KSTP_ESP should return the value of the kernel stack and not a -1. Sh..
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2009-11-01 15:06 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-28 11:56 [PATCH] proc: fix ->stack_start in compat mode Alexey Dobriyan
2009-11-01 9:54 ` Stefani Seibold
2009-11-01 10:21 ` Alexey Dobriyan
2009-11-01 12:43 ` Alexey Dobriyan
2009-11-01 14:42 ` Stefani Seibold
2009-11-01 15:06 ` Stefani Seibold
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox