Why not trap stack writes above ebp to avoid overflow exploits?
<p>I've been looking at StackGuard and similar, and also Intel's new technology preview on "Control flow enforcement" (basically a shadow stack), here: <a href="https://software.intel.com/sites/default/files/managed/4d/2a/control-flow-enforcement-technology-preview.pdf" rel="nofollow noreferrer">https://software.intel.com/sites/default/files/managed/4d/2a/control-flow-enforcement-technology-preview.pdf</a>.</p>

<p>Obviously there is a reason why what I'm wondering will either break everything or not protect against buffer overflows, but its simple so I'm sure someone can explain why I'm barking up the wrong tree.</p>

<p><a href="https://i.stack.imgur.com/RblaA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/RblaA.png" alt="enter image description here"></a></p>

<p>Why not implement in CPU hardware an optional feature to abort/trap when writing to a stack address higher than or equal to ebp?  This would protect the return address and function parameters from being overwritten via a buffer overflow.</p>