I was looking for an answer for this question but didn't find any clear answer.
When calling a sys call such as getpid(), while returning from kernel mode to user mode, does the TLB get flushed?
My "logic" says yes, in order to prevent the user to invades kernel's address space. I am not very convinced with that answer because of the hardware protection which can protect the kernel's virtual space and save flushing time.
Would love to get this straight,
Thanks.