diff options
| author | Al Viro <viro@zeniv.linux.org.uk> | 2012-11-19 22:00:52 -0500 |
|---|---|---|
| committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-02-03 18:16:24 -0500 |
| commit | b3af11afe06abdcf980b5f5c0b44dc46c496ddc3 (patch) | |
| tree | 3f784880fd8f14734dd3fd19a5a5a3757df0d44c | |
| parent | ea93a6e2e73c5a1a8d1d60098f1ca5618fd5aca1 (diff) | |
x86: get rid of pt_regs argument of iopl(2)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| -rw-r--r-- | arch/x86/ia32/ia32entry.S | 1 | ||||
| -rw-r--r-- | arch/x86/include/asm/syscalls.h | 2 | ||||
| -rw-r--r-- | arch/x86/kernel/entry_32.S | 1 | ||||
| -rw-r--r-- | arch/x86/kernel/entry_64.S | 31 | ||||
| -rw-r--r-- | arch/x86/kernel/ioport.c | 3 | ||||
| -rw-r--r-- | arch/x86/syscalls/syscall_32.tbl | 2 | ||||
| -rw-r--r-- | arch/x86/um/sys_call_table_32.c | 1 |
7 files changed, 17 insertions, 24 deletions
diff --git a/arch/x86/ia32/ia32entry.S b/arch/x86/ia32/ia32entry.S index 102ff7cb3e41..74bc91e3612b 100644 --- a/arch/x86/ia32/ia32entry.S +++ b/arch/x86/ia32/ia32entry.S | |||
| @@ -467,7 +467,6 @@ GLOBAL(\label) | |||
| 467 | PTREGSCALL stub32_execve, compat_sys_execve, %rcx | 467 | PTREGSCALL stub32_execve, compat_sys_execve, %rcx |
| 468 | PTREGSCALL stub32_fork, sys_fork, %rdi | 468 | PTREGSCALL stub32_fork, sys_fork, %rdi |
| 469 | PTREGSCALL stub32_vfork, sys_vfork, %rdi | 469 | PTREGSCALL stub32_vfork, sys_vfork, %rdi |
| 470 | PTREGSCALL stub32_iopl, sys_iopl, %rsi | ||
| 471 | 470 | ||
| 472 | ALIGN | 471 | ALIGN |
| 473 | GLOBAL(stub32_clone) | 472 | GLOBAL(stub32_clone) |
diff --git a/arch/x86/include/asm/syscalls.h b/arch/x86/include/asm/syscalls.h index 58b7e3eac0ae..76be6f2d980c 100644 --- a/arch/x86/include/asm/syscalls.h +++ b/arch/x86/include/asm/syscalls.h | |||
| @@ -18,7 +18,7 @@ | |||
| 18 | /* Common in X86_32 and X86_64 */ | 18 | /* Common in X86_32 and X86_64 */ |
| 19 | /* kernel/ioport.c */ | 19 | /* kernel/ioport.c */ |
| 20 | asmlinkage long sys_ioperm(unsigned long, unsigned long, int); | 20 | asmlinkage long sys_ioperm(unsigned long, unsigned long, int); |
| 21 | long sys_iopl(unsigned int, struct pt_regs *); | 21 | asmlinkage long sys_iopl(unsigned int); |
| 22 | 22 | ||
| 23 | /* kernel/ldt.c */ | 23 | /* kernel/ldt.c */ |
| 24 | asmlinkage int sys_modify_ldt(int, void __user *, unsigned long); | 24 | asmlinkage int sys_modify_ldt(int, void __user *, unsigned long); |
diff --git a/arch/x86/kernel/entry_32.S b/arch/x86/kernel/entry_32.S index 6ed91d9980e2..415c6346d8bf 100644 --- a/arch/x86/kernel/entry_32.S +++ b/arch/x86/kernel/entry_32.S | |||
| @@ -738,7 +738,6 @@ ENTRY(ptregs_##name) ; \ | |||
| 738 | CFI_ENDPROC; \ | 738 | CFI_ENDPROC; \ |
| 739 | ENDPROC(ptregs_##name) | 739 | ENDPROC(ptregs_##name) |
| 740 | 740 | ||
| 741 | PTREGSCALL1(iopl) | ||
| 742 | PTREGSCALL0(sigreturn) | 741 | PTREGSCALL0(sigreturn) |
| 743 | PTREGSCALL0(rt_sigreturn) | 742 | PTREGSCALL0(rt_sigreturn) |
| 744 | PTREGSCALL2(vm86) | 743 | PTREGSCALL2(vm86) |
diff --git a/arch/x86/kernel/entry_64.S b/arch/x86/kernel/entry_64.S index 2f2f57ac3748..4486fee3999f 100644 --- a/arch/x86/kernel/entry_64.S +++ b/arch/x86/kernel/entry_64.S | |||
| @@ -828,23 +828,6 @@ int_restore_rest: | |||
| 828 | CFI_ENDPROC | 828 | CFI_ENDPROC |
| 829 | END(system_call) | 829 | END(system_call) |
| 830 | 830 | ||
| 831 | /* | ||
| 832 | * Certain special system calls that need to save a complete full stack frame. | ||
| 833 | */ | ||
| 834 | .macro PTREGSCALL label,func,arg | ||
| 835 | ENTRY(\label) | ||
| 836 | PARTIAL_FRAME 1 8 /* offset 8: return address */ | ||
| 837 | subq $REST_SKIP, %rsp | ||
| 838 | CFI_ADJUST_CFA_OFFSET REST_SKIP | ||
| 839 | call save_rest | ||
| 840 | DEFAULT_FRAME 0 8 /* offset 8: return address */ | ||
| 841 | leaq 8(%rsp), \arg /* pt_regs pointer */ | ||
| 842 | call \func | ||
| 843 | jmp ptregscall_common | ||
| 844 | CFI_ENDPROC | ||
| 845 | END(\label) | ||
| 846 | .endm | ||
| 847 | |||
| 848 | .macro FORK_LIKE func | 831 | .macro FORK_LIKE func |
| 849 | ENTRY(stub_\func) | 832 | ENTRY(stub_\func) |
| 850 | CFI_STARTPROC | 833 | CFI_STARTPROC |
| @@ -861,10 +844,22 @@ ENTRY(stub_\func) | |||
| 861 | END(stub_\func) | 844 | END(stub_\func) |
| 862 | .endm | 845 | .endm |
| 863 | 846 | ||
| 847 | .macro FIXED_FRAME label,func | ||
| 848 | ENTRY(\label) | ||
| 849 | CFI_STARTPROC | ||
| 850 | PARTIAL_FRAME 0 8 /* offset 8: return address */ | ||
| 851 | FIXUP_TOP_OF_STACK %r11, 8-ARGOFFSET | ||
| 852 | call \func | ||
| 853 | RESTORE_TOP_OF_STACK %r11, 8-ARGOFFSET | ||
| 854 | ret | ||
| 855 | CFI_ENDPROC | ||
| 856 | END(\label) | ||
| 857 | .endm | ||
| 858 | |||
| 864 | FORK_LIKE clone | 859 | FORK_LIKE clone |
| 865 | FORK_LIKE fork | 860 | FORK_LIKE fork |
| 866 | FORK_LIKE vfork | 861 | FORK_LIKE vfork |
| 867 | PTREGSCALL stub_iopl, sys_iopl, %rsi | 862 | FIXED_FRAME stub_iopl, sys_iopl |
| 868 | 863 | ||
| 869 | ENTRY(ptregscall_common) | 864 | ENTRY(ptregscall_common) |
| 870 | DEFAULT_FRAME 1 8 /* offset 8: return address */ | 865 | DEFAULT_FRAME 1 8 /* offset 8: return address */ |
diff --git a/arch/x86/kernel/ioport.c b/arch/x86/kernel/ioport.c index 8c968974253d..4ddaf66ea35f 100644 --- a/arch/x86/kernel/ioport.c +++ b/arch/x86/kernel/ioport.c | |||
| @@ -93,8 +93,9 @@ asmlinkage long sys_ioperm(unsigned long from, unsigned long num, int turn_on) | |||
| 93 | * on system-call entry - see also fork() and the signal handling | 93 | * on system-call entry - see also fork() and the signal handling |
| 94 | * code. | 94 | * code. |
| 95 | */ | 95 | */ |
| 96 | long sys_iopl(unsigned int level, struct pt_regs *regs) | 96 | SYSCALL_DEFINE1(iopl, unsigned int, level) |
| 97 | { | 97 | { |
| 98 | struct pt_regs *regs = current_pt_regs(); | ||
| 98 | unsigned int old = (regs->flags >> 12) & 3; | 99 | unsigned int old = (regs->flags >> 12) & 3; |
| 99 | struct thread_struct *t = ¤t->thread; | 100 | struct thread_struct *t = ¤t->thread; |
| 100 | 101 | ||
diff --git a/arch/x86/syscalls/syscall_32.tbl b/arch/x86/syscalls/syscall_32.tbl index 28e3fa9056ea..aa15a7a94cf7 100644 --- a/arch/x86/syscalls/syscall_32.tbl +++ b/arch/x86/syscalls/syscall_32.tbl | |||
| @@ -116,7 +116,7 @@ | |||
| 116 | 107 i386 lstat sys_newlstat compat_sys_newlstat | 116 | 107 i386 lstat sys_newlstat compat_sys_newlstat |
| 117 | 108 i386 fstat sys_newfstat compat_sys_newfstat | 117 | 108 i386 fstat sys_newfstat compat_sys_newfstat |
| 118 | 109 i386 olduname sys_uname | 118 | 109 i386 olduname sys_uname |
| 119 | 110 i386 iopl ptregs_iopl stub32_iopl | 119 | 110 i386 iopl sys_iopl |
| 120 | 111 i386 vhangup sys_vhangup | 120 | 111 i386 vhangup sys_vhangup |
| 121 | 112 i386 idle | 121 | 112 i386 idle |
| 122 | 113 i386 vm86old ptregs_vm86old sys32_vm86_warning | 122 | 113 i386 vm86old ptregs_vm86old sys32_vm86_warning |
diff --git a/arch/x86/um/sys_call_table_32.c b/arch/x86/um/sys_call_table_32.c index a0c3b0d1a122..5cc2bcefb6ab 100644 --- a/arch/x86/um/sys_call_table_32.c +++ b/arch/x86/um/sys_call_table_32.c | |||
| @@ -24,7 +24,6 @@ | |||
| 24 | 24 | ||
| 25 | #define old_mmap sys_old_mmap | 25 | #define old_mmap sys_old_mmap |
| 26 | 26 | ||
| 27 | #define ptregs_iopl sys_iopl | ||
| 28 | #define ptregs_vm86old sys_vm86old | 27 | #define ptregs_vm86old sys_vm86old |
| 29 | #define ptregs_vm86 sys_vm86 | 28 | #define ptregs_vm86 sys_vm86 |
| 30 | 29 | ||
