x86: move x86_userspace_thread_exit() from user stack to commpage
x86_userspace_thread_exit() is a stub originally placed at the bottom of each thread user stack that ensures any thread invokes exit_thread() upon returning from its main higher level function. Putting anything that is expected to be executed on a stack causes problems when implementing data execution prevention. Code of x86_userspace_thread_exit() is now moved to commpage which seems to be much more appropriate place for it.
This commit is contained in:
@@ -16,6 +16,8 @@
|
||||
(COMMPAGE_ENTRY_FIRST_ARCH_SPECIFIC + 3)
|
||||
#define COMMPAGE_ENTRY_X86_SIGNAL_HANDLER_BEOS \
|
||||
(COMMPAGE_ENTRY_FIRST_ARCH_SPECIFIC + 4)
|
||||
#define COMMPAGE_ENTRY_X86_THREAD_EXIT \
|
||||
(COMMPAGE_ENTRY_FIRST_ARCH_SPECIFIC + 5)
|
||||
|
||||
#define ARCH_USER_COMMPAGE_ADDR (0xffff0000)
|
||||
|
||||
|
||||
@@ -13,6 +13,8 @@
|
||||
#define COMMPAGE_ENTRY_X86_MEMSET (COMMPAGE_ENTRY_FIRST_ARCH_SPECIFIC + 1)
|
||||
#define COMMPAGE_ENTRY_X86_SIGNAL_HANDLER \
|
||||
(COMMPAGE_ENTRY_FIRST_ARCH_SPECIFIC + 2)
|
||||
#define COMMPAGE_ENTRY_X86_THREAD_EXIT \
|
||||
(COMMPAGE_ENTRY_FIRST_ARCH_SPECIFIC + 3)
|
||||
|
||||
#define ARCH_USER_COMMPAGE_ADDR (0xffffffffffff0000)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user