Commit 77482014 authored by Linus Torvalds's avatar Linus Torvalds

x86 sysenter: clear %ebp on exit.

It contains the thread info pointer. That's not something that
user mode can really use for anything interesting, but it's also
not something that user mode should ever really see.

Pointed out by Brad Spender as being in PaX.
parent f9286bcf
...@@ -235,6 +235,7 @@ sysenter_past_esp: ...@@ -235,6 +235,7 @@ sysenter_past_esp:
/* if something modifies registers it must also disable sysexit */ /* if something modifies registers it must also disable sysexit */
movl EIP(%esp), %edx movl EIP(%esp), %edx
movl OLDESP(%esp), %ecx movl OLDESP(%esp), %ecx
xorl %ebp,%ebp
sti sti
sysexit sysexit
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment