I am currently reading Linux Kernel Development by Robert Love.
In the chapter "15 The Process Address Space" he prints the memory map of a process.
user@machine:~$ pmap 1424 #all the processes mapped memory (skipped for readability) bfffe000 (8KB) rwxp (0:00 0) [ stack ]
The last line shows the stack (as it grows down).
He now states:
The stack is, naturally, readable, writeable and executable - not of much use otherwise.
As far as I know we use the stack for data and code addresses (functions and their parameters/variable).
I do not understand why the stack must be executable?