Re: 2.6.8-rc4-mm1

From: William Lee Irwin III
Date: Tue Aug 10 2004 - 18:20:12 EST


On Tue, Aug 10, 2004 at 06:39:33PM -0400, Robert Picco wrote:
> copy_thread expects a switch_stack below pt_regs on the stack. the
> switch_stack would have the parent's bspstore value for computing how
> much register backing store to copy into child. there isn't a
> switch_stack and the resultant bspstore size computed is enormous
> (depends on what there is on stack). i suspect printk has changed stack
> and the code layout changed too.
[...]
> * For SMP idle threads, fork_by_hand() calls do_fork with
> * NULL regs.
> */
> - if (!regs)
> + if (clone_flags & CLONE_IDLETASK)
> return 0;
> #endif

It may not be immediately obvious, but since all the checks for
CLONE_IDLETASK were ripped out in patches prior to this, respecting
CLONE_IDLETASK anywhere means that userspace can create idle threads(!).
So the alternative fixes I've been posting are very necessary.


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