The %fs register is used by user space TLS - it is CPU dependent, and must
not be restored from the iframe; it will be set by the scheduling code. This is only of concern on SMP machines and could prevent TLS from working. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9310 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -99,7 +99,7 @@ int_bottom:
|
|||||||
kernel_stack:
|
kernel_stack:
|
||||||
call i386_handle_trap
|
call i386_handle_trap
|
||||||
pop %gs
|
pop %gs
|
||||||
pop %fs
|
pop %fs // kernel stacks don't care about TLS (which uses %fs)
|
||||||
pop %es
|
pop %es
|
||||||
pop %ds
|
pop %ds
|
||||||
popa
|
popa
|
||||||
@@ -124,7 +124,7 @@ int_bottom:
|
|||||||
call i386_handle_trap
|
call i386_handle_trap
|
||||||
lss 84(%esp),%esp // reload custom stack address
|
lss 84(%esp),%esp // reload custom stack address
|
||||||
pop %gs
|
pop %gs
|
||||||
pop %fs
|
addl $4, %esp // we skip %fs, as this contains the CPU dependent TLS segment
|
||||||
pop %es
|
pop %es
|
||||||
pop %ds
|
pop %ds
|
||||||
popa
|
popa
|
||||||
@@ -193,7 +193,7 @@ FUNCTION(i386_restore_frame_from_syscall):
|
|||||||
add $4, %esp // make the iframe our current stack position (we don't need the
|
add $4, %esp // make the iframe our current stack position (we don't need the
|
||||||
// return address anymore, as we will use the one of the frame)
|
// return address anymore, as we will use the one of the frame)
|
||||||
pop %gs // recreate the frame environment
|
pop %gs // recreate the frame environment
|
||||||
pop %fs
|
addl $4, %esp // we skip %fs, as this contains the CPU dependent TLS segment
|
||||||
pop %es
|
pop %es
|
||||||
pop %ds
|
pop %ds
|
||||||
popa
|
popa
|
||||||
|
|||||||
Reference in New Issue
Block a user