Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Is there an efficient way on x64 to guard the stack pointer or program pointer? Maybe using hardware breakpoints? freeRTOS has such an option.


I doubt it. The stack pointer is modified upon function entry, exit, and per function call (parameters pushed onto the stack, popped off afterwards). You could try to add code to every function to check of the stack pointer is between two addresses and fault if not, but then threading becomes more difficult ...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: