Re: [PATCH] show_task() and thread_saved_pc() fix for x86

2000-11-15 Thread Ralf Baechle
On Tue, Nov 14, 2000 at 10:19:32AM +0100, Jean Wolter wrote: > > > OTOH, the value is used only by Alt-SysRq-T, so... Hell knows. > > > > No, it's also used by 'ps -l'. See wchan. > > ps -l uses get_wchan() (an architecture specific function from > arch/*/kernel/process.c) to get the return ad

Re: [PATCH] show_task() and thread_saved_pc() fix for x86

2000-11-14 Thread Jean Wolter
Richard Henderson <[EMAIL PROTECTED]> writes: > > OTOH, the value is used only by Alt-SysRq-T, so... Hell knows. > > No, it's also used by 'ps -l'. See wchan. ps -l uses get_wchan() (an architecture specific function from arch/*/kernel/process.c) to get the return address from schedule(). And

Re: [PATCH] show_task() and thread_saved_pc() fix for x86

2000-11-13 Thread Richard Henderson
On Sat, Nov 11, 2000 at 10:18:46PM -0500, Alexander Viro wrote: > Alternative variant: just let schedule() store its return address > in the task_struct. Please please. I can't reliably unwind the stack on Alpha. > OTOH, the value is used only by Alt-SysRq-T, so... Hell knows. No, it's also us

Re: [PATCH] show_task() and thread_saved_pc() fix for x86

2000-11-12 Thread Richard Henderson
On Sat, Nov 11, 2000 at 02:06:34PM +0100, Ralf Baechle wrote: > Reminds me that the Alpha implementation of get_wchan() looks to me like > it doesn't handle all cases of schedule() being called from another > scheduler function correctly. Certainly not -- it's impossible. > I'd really like to se

Re: [PATCH] show_task() and thread_saved_pc() fix for x86

2000-11-11 Thread Alexander Viro
On Sat, 11 Nov 2000, Alexander Viro wrote: > I would probably turn it into > unsigned long *ebp = *((unsigned long **)t->esp); ebp++; /* We want return address, not the previous frame pointer */ > /* Bits 0,1 and 13..31 must be shared with the stack base */ > if (((

Re: [PATCH] show_task() and thread_saved_pc() fix for x86

2000-11-11 Thread Alexander Viro
On Sat, 11 Nov 2000, Linus Torvalds wrote: > On Fri, 10 Nov 2000, Alexander Viro wrote: > > diff -urN rc11-2/include/asm-i386/processor.h >rc11-2-show_task/include/asm-i386/processor.h > > --- rc11-2/include/asm-i386/processor.h Fri Nov 10 09:14:04 2000 > > +++ rc11-2-show_task/include/asm

Re: [PATCH] show_task() and thread_saved_pc() fix for x86

2000-11-11 Thread Linus Torvalds
On Fri, 10 Nov 2000, Alexander Viro wrote: > diff -urN rc11-2/include/asm-i386/processor.h >rc11-2-show_task/include/asm-i386/processor.h > --- rc11-2/include/asm-i386/processor.h Fri Nov 10 09:14:04 2000 > +++ rc11-2-show_task/include/asm-i386/processor.h Fri Nov 10 16:08:15 2000 > @

Re: [PATCH] show_task() and thread_saved_pc() fix for x86

2000-11-11 Thread Ralf Baechle
On Fri, Nov 10, 2000 at 04:26:32PM -0500, Alexander Viro wrote: > * thread_saved_pc() on x86 returns (thread->esp)[3]. Bogus, since the > third word from the stack top has absolutely nothing to return address of > any kind. Correct value: (thread->esp)[0][1] - ebp is on top of the stack > a