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 /arch/x86/kernel | |
parent | ea93a6e2e73c5a1a8d1d60098f1ca5618fd5aca1 (diff) |
x86: get rid of pt_regs argument of iopl(2)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/x86/kernel')
-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 |
3 files changed, 15 insertions, 20 deletions
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 | ||