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

Re: Rep:Re: Rep:Re: [f-cpu] Stack handling



Nicolas Boulay wrote:
> Stack have a main draw back : it's add a udge dependancies in a single
> poor register (the stack pointer).

For classical code OK, but for well written alogithm you can use more 
than one stack. On a 68000 processor I've written a compiler that use 
two stack and switch each time between, so each push/pop operation was 
directed alternatively in the first and in the second.
You can use as stack as you want.

> 
> For security reason, i have proposed to use 2 stack : one for data, one
> for code. So buffer overflow will became really hard ! this could be
> usefull for performance, too. But most of the time, the stack will use
> the register bank...
> 

In most case you never have to exec code in the stack so put it in a 
page without execution right and you can't use buffer overflow to 
execute a shellcode.
Case you need execute code in stack was very rare so in this case you 
can make an exception and check your code a lot of time.

Tom


-- 
Thomas Lavergne                       "Le vrai rêveur est celui qui rêve
                                        de l'impossible."  (Elsa Triolet)
thomas.lavergne@laposte.net
d-12@laposte.net    ICQ:#137121910     http://assoc.wanadoo.fr/thallium/

*************************************************************
To unsubscribe, send an e-mail to majordomo@seul.org with
unsubscribe f-cpu       in the body. http://f-cpu.seul.org/