Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 25335
b: refs/heads/master
c: 7bf36bb
h: refs/heads/master
i:
  25333: 9c8a014
  25331: ce4a16d
  25327: 03b4815
v: v3
  • Loading branch information
Andi Kleen authored and Linus Torvalds committed Apr 9, 2006
1 parent f13f611 commit 0110315
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 553f265fe883a23502ee351845f09334790f18b8
refs/heads/master: 7bf36bbc5e0c09271f9efe22162f8cc3f8ebd3d2
12 changes: 10 additions & 2 deletions trunk/arch/x86_64/kernel/entry.S
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,10 @@ rff_trace:
*
* XXX if we had a free scratch register we could save the RSP into the stack frame
* and report it properly in ps. Unfortunately we haven't.
*
* When user can change the frames always force IRET. That is because
* it deals with uncanonical addresses better. SYSRET has trouble
* with them due to bugs in both AMD and Intel CPUs.
*/

ENTRY(system_call)
Expand Down Expand Up @@ -254,7 +258,10 @@ sysret_signal:
xorl %esi,%esi # oldset -> arg2
call ptregscall_common
1: movl $_TIF_NEED_RESCHED,%edi
jmp sysret_check
/* Use IRET because user could have changed frame. This
works because ptregscall_common has called FIXUP_TOP_OF_STACK. */
cli
jmp int_with_check

badsys:
movq $-ENOSYS,RAX-ARGOFFSET(%rsp)
Expand All @@ -280,7 +287,8 @@ tracesys:
call syscall_trace_leave
RESTORE_TOP_OF_STACK %rbx
RESTORE_REST
jmp ret_from_sys_call
/* Use IRET because user could have changed frame */
jmp int_ret_from_sys_call
CFI_ENDPROC

/*
Expand Down

0 comments on commit 0110315

Please sign in to comment.