x86: pass in pt_regs pointer for syscalls that need it
Some syscalls need to access the pt_regs structure, either to copy user register state or to modifiy it. This patch adds stubs to load the address of the pt_regs struct into the %eax register, and changes the syscalls to regparm(1) to receive the pt_regs pointer as the first argument. Signed-off-by: Brian Gerst <brgerst@gmail.com> Acked-by: Tejun Heo <tj@kernel.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
@ -131,10 +131,8 @@ static int do_iopl(unsigned int level, struct pt_regs *regs)
|
||||
}
|
||||
|
||||
#ifdef CONFIG_X86_32
|
||||
asmlinkage long sys_iopl(unsigned long regsp)
|
||||
ptregscall long sys_iopl(struct pt_regs *regs, unsigned int level)
|
||||
{
|
||||
struct pt_regs *regs = (struct pt_regs *)®sp;
|
||||
unsigned int level = regs->bx;
|
||||
struct thread_struct *t = ¤t->thread;
|
||||
int rc;
|
||||
|
||||
|
Reference in New Issue
Block a user