/[linux-patches]/genpatches-2.6/trunk/2.6.16/1004_linux-2.6.16.5.patch
Gentoo

Contents of /genpatches-2.6/trunk/2.6.16/1004_linux-2.6.16.5.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 412 - (show annotations) (download) (as text)
Wed Apr 19 09:28:08 2006 UTC (14 years, 7 months ago) by johnm
File MIME type: text/x-diff
File size: 1708 byte(s)
bump to 2.6.16.6
1 diff --git a/arch/x86_64/kernel/entry.S b/arch/x86_64/kernel/entry.S
2 index 7c10e90..ab6e44d 100644
3 --- a/arch/x86_64/kernel/entry.S
4 +++ b/arch/x86_64/kernel/entry.S
5 @@ -180,6 +180,10 @@ rff_trace:
6 *
7 * XXX if we had a free scratch register we could save the RSP into the stack frame
8 * and report it properly in ps. Unfortunately we haven't.
9 + *
10 + * When user can change the frames always force IRET. That is because
11 + * it deals with uncanonical addresses better. SYSRET has trouble
12 + * with them due to bugs in both AMD and Intel CPUs.
13 */
14
15 ENTRY(system_call)
16 @@ -254,7 +258,10 @@ sysret_signal:
17 xorl %esi,%esi # oldset -> arg2
18 call ptregscall_common
19 1: movl $_TIF_NEED_RESCHED,%edi
20 - jmp sysret_check
21 + /* Use IRET because user could have changed frame. This
22 + works because ptregscall_common has called FIXUP_TOP_OF_STACK. */
23 + cli
24 + jmp int_with_check
25
26 badsys:
27 movq $-ENOSYS,RAX-ARGOFFSET(%rsp)
28 @@ -280,7 +287,8 @@ tracesys:
29 call syscall_trace_leave
30 RESTORE_TOP_OF_STACK %rbx
31 RESTORE_REST
32 - jmp ret_from_sys_call
33 + /* Use IRET because user could have changed frame */
34 + jmp int_ret_from_sys_call
35 CFI_ENDPROC
36
37 /*
38 @@ -408,25 +416,9 @@ ENTRY(stub_execve)
39 CFI_ADJUST_CFA_OFFSET -8
40 CFI_REGISTER rip, r11
41 SAVE_REST
42 - movq %r11, %r15
43 - CFI_REGISTER rip, r15
44 FIXUP_TOP_OF_STACK %r11
45 call sys_execve
46 - GET_THREAD_INFO(%rcx)
47 - bt $TIF_IA32,threadinfo_flags(%rcx)
48 - CFI_REMEMBER_STATE
49 - jc exec_32bit
50 RESTORE_TOP_OF_STACK %r11
51 - movq %r15, %r11
52 - CFI_REGISTER rip, r11
53 - RESTORE_REST
54 - pushq %r11
55 - CFI_ADJUST_CFA_OFFSET 8
56 - CFI_REL_OFFSET rip, 0
57 - ret
58 -
59 -exec_32bit:
60 - CFI_RESTORE_STATE
61 movq %rax,RAX(%rsp)
62 RESTORE_REST
63 jmp int_ret_from_sys_call

  ViewVC Help
Powered by ViewVC 1.1.20