Re: [PATCH] Fix out-by-one error in traps.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2007-08-31 at 11:24 -0700, Linus Torvalds wrote:
> 
> On Sat, 1 Sep 2007, Rusty Russell wrote:
> > 
> > This is only for the initial booting stack (init_thread_union); see
> > arch/i386/kernel/head.S:
> > 	/* Set up the stack pointer */
> > 	lss stack_start,%esp
> > 	...
> > 	pushl $0		# fake return address for unwinder
> 
> Ok, we should fix that. We should just make it look like all other stack 
> frames.
> 
> There is other code in the kernel that "knows" that all kernel stacks have 
> the fields for the user stack return on it, namely the ptrace code etc. 
> Now, the initial stack is hopefully never *accessed* by that kind of code, 
> but this kind of special-case code is just wrong.

Yes, but -ETIMEDOUT.  Maybe for 2.6.24...

> IOW, how 
> about this one, which just declares a structure that describes the stack 
> frame thing? That just makes everything clearer, since we can then use 
> "sizeof(that structure)" instead of using the magic "2*sizeof(unsigned 
> long)".

Much nicer, thanks.

Rusty.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux