Re: [PATCH 1/3] signal(i386): alternative signal stack wraparoundoccurs

From: Ingo Molnar
Date: Tue Dec 04 2007 - 08:03:02 EST



* Shi Weihua <shiwh@xxxxxxxxxxxxxx> wrote:

> > When it's the handler function itself or its callees that cause the
> > overflow, rather than the signal handler frame setup alone crossing
> > the boundary, this still won't help. But I don't see any way to
> > distinguish that from the valid longjmp case.
>
> Thank you for your detailed explanation and patch. I tested your
> patch, unfortunately it can not stop all kinds of overflow.
[...]
> So, the patch I posted is still needed

thanks, i've picked up your fix for x86.git, for 2.6.25 merging.

> Surely, adding a variable to sched.h is not a good idea.
> Could you tell me a better place to store the previous esp?

i think sched.h is ok - it has a sas_ss_sp field already. Alternatively,
if we only want this in x86, we could put it into the thread_struct -
but i think eventually other architectures would want to use this too,
right?

Ingo
--
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/