Magellan Linux

Annotation of /trunk/kernel26-alx/patches-2.6.20-r6/0120-2.6.20.20-all-fixes.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1175 - (hide annotations) (download)
Thu Oct 14 12:15:46 2010 UTC (13 years, 8 months ago) by niro
File size: 3504 byte(s)
-2.6.20-alx-r6 new magellan 0.5.2 kernel
1 niro 1175 diff --git a/arch/x86_64/ia32/ia32entry.S b/arch/x86_64/ia32/ia32entry.S
2     index b4aa875..824fe53 100644
3     --- a/arch/x86_64/ia32/ia32entry.S
4     +++ b/arch/x86_64/ia32/ia32entry.S
5     @@ -38,6 +38,18 @@
6     movq %rax,R8(%rsp)
7     .endm
8    
9     + .macro LOAD_ARGS32 offset
10     + movl \offset(%rsp),%r11d
11     + movl \offset+8(%rsp),%r10d
12     + movl \offset+16(%rsp),%r9d
13     + movl \offset+24(%rsp),%r8d
14     + movl \offset+40(%rsp),%ecx
15     + movl \offset+48(%rsp),%edx
16     + movl \offset+56(%rsp),%esi
17     + movl \offset+64(%rsp),%edi
18     + movl \offset+72(%rsp),%eax
19     + .endm
20     +
21     .macro CFI_STARTPROC32 simple
22     CFI_STARTPROC \simple
23     CFI_UNDEFINED r8
24     @@ -152,7 +164,7 @@ sysenter_tracesys:
25     movq $-ENOSYS,RAX(%rsp) /* really needed? */
26     movq %rsp,%rdi /* &pt_regs -> arg1 */
27     call syscall_trace_enter
28     - LOAD_ARGS ARGOFFSET /* reload args from stack in case ptrace changed it */
29     + LOAD_ARGS32 ARGOFFSET /* reload args from stack in case ptrace changed it */
30     RESTORE_REST
31     movl %ebp, %ebp
32     /* no need to do an access_ok check here because rbp has been
33     @@ -255,7 +267,7 @@ cstar_tracesys:
34     movq $-ENOSYS,RAX(%rsp) /* really needed? */
35     movq %rsp,%rdi /* &pt_regs -> arg1 */
36     call syscall_trace_enter
37     - LOAD_ARGS ARGOFFSET /* reload args from stack in case ptrace changed it */
38     + LOAD_ARGS32 ARGOFFSET /* reload args from stack in case ptrace changed it */
39     RESTORE_REST
40     movl RSP-ARGOFFSET(%rsp), %r8d
41     /* no need to do an access_ok check here because r8 has been
42     @@ -333,7 +345,7 @@ ia32_tracesys:
43     movq $-ENOSYS,RAX(%rsp) /* really needed? */
44     movq %rsp,%rdi /* &pt_regs -> arg1 */
45     call syscall_trace_enter
46     - LOAD_ARGS ARGOFFSET /* reload args from stack in case ptrace changed it */
47     + LOAD_ARGS32 ARGOFFSET /* reload args from stack in case ptrace changed it */
48     RESTORE_REST
49     jmp ia32_do_syscall
50     END(ia32_syscall)
51     diff --git a/arch/x86_64/kernel/ptrace.c b/arch/x86_64/kernel/ptrace.c
52     index addc14a..e086073 100644
53     --- a/arch/x86_64/kernel/ptrace.c
54     +++ b/arch/x86_64/kernel/ptrace.c
55     @@ -224,10 +224,6 @@ static int putreg(struct task_struct *child,
56     {
57     unsigned long tmp;
58    
59     - /* Some code in the 64bit emulation may not be 64bit clean.
60     - Don't take any chances. */
61     - if (test_tsk_thread_flag(child, TIF_IA32))
62     - value &= 0xffffffff;
63     switch (regno) {
64     case offsetof(struct user_regs_struct,fs):
65     if (value && (value & 3) != 3)
66     diff --git a/kernel/sys.c b/kernel/sys.c
67     index 6e2101d..475ddbb 100644
68     --- a/kernel/sys.c
69     +++ b/kernel/sys.c
70     @@ -1916,6 +1916,16 @@ asmlinkage long sys_setrlimit(unsigned int resource, struct rlimit __user *rlim)
71     if (retval)
72     return retval;
73    
74     + if (resource == RLIMIT_CPU && new_rlim.rlim_cur == 0) {
75     + /*
76     + * The caller is asking for an immediate RLIMIT_CPU
77     + * expiry. But we use the zero value to mean "it was
78     + * never set". So let's cheat and make it one second
79     + * instead
80     + */
81     + new_rlim.rlim_cur = 1;
82     + }
83     +
84     task_lock(current->group_leader);
85     *old_rlim = new_rlim;
86     task_unlock(current->group_leader);
87     @@ -1937,15 +1947,6 @@ asmlinkage long sys_setrlimit(unsigned int resource, struct rlimit __user *rlim)
88     unsigned long rlim_cur = new_rlim.rlim_cur;
89     cputime_t cputime;
90    
91     - if (rlim_cur == 0) {
92     - /*
93     - * The caller is asking for an immediate RLIMIT_CPU
94     - * expiry. But we use the zero value to mean "it was
95     - * never set". So let's cheat and make it one second
96     - * instead
97     - */
98     - rlim_cur = 1;
99     - }
100     cputime = secs_to_cputime(rlim_cur);
101     read_lock(&tasklist_lock);
102     spin_lock_irq(&current->sighand->siglock);