In the "Hacking the art of Exploitation" its said that the basic idea of stack overflows attacks is that the operating system cancan't differentiate instructions from data inside the stack ,and the solution to this problem was to implement a "non executable stack".
My question is how is this implemented ??