3 ms·
> No one should ever need more than 64kBs for a stack anyways. Well, if people would stop storing anything except than return addresses on the stack, yeah, pro
by Joker_vD 2mo ago
> No one should ever need more than 64kBs for a stack anyways.
Well, if people would stop storing anything except than return addresses on the stack, yeah, probably even 32 KiB of stack would be enough for anyone. It'd also single-handedly stop all kinds of stack-smashing attacks, too: can't overwrite a return address on the stack if nothing stores data on the stack except the CALL/RET instructions.
Unfortunately, the current zeitgeist is still to have "writeable stacks" which are only moderately less horrible for the security than "executable stacks".
- rramadass 2mo agoYou can probably do this by maintaining two parallel stacks, changes to prologue/epilogue code and runtime startup files.