lkml.org 
[lkml]   [2009]   [Oct]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] consider stack access while checking for alternate signal stack
Date
> >+#ifdef CONFIG_STACK_GROWSUP
> >+ return sp >= current->sas_ss_sp &&
> >+ sp - current->sas_ss_sp < current->sas_ss_size;
>
> CONFIG_STACK_GROWSUP is wrong: If your stack grows up and sp ==
> sas_ss_sp + size than you are using the last entry in your sig stack
> which will be not recognized correctly.

+ sp - current->sas_ss_sp <= current->sas_ss_size;

then?

> The case where sp == sas_ss_sp
> is also not detected correctly but this should not happen in real life.

So you say that sp==sas_ss_sp should not be considered "on the sig stack"?

> That is the PRE case which is the only relevant since we don't have any
> POST architectures. The check here produces the same results as my
> variant so it is okay :)
> So you prefer the smaller patch with comments around it?

Yes, I think it is far clearer and easier to read than what you posted.


Thanks,
Roland


\
 
 \ /
  Last update: 2009-10-20 23:15    [W:0.090 / U:0.192 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site