x86/ptrace: Remove checks for TIF_IA32 when changing CS and SS
The ability for modified CS and/or SS to be useful has nothing to do with TIF_IA32. Similarly, if there's an exploit involving changing CS or SS, it's exploitable with or without a TIF_IA32 check. So just delete the check. Signed-off-by: Andy Lutomirski <luto@amacapital.net> Cc: Borislav Petkov <bp@alien8.de> Cc: Denys Vlasenko <dvlasenk@redhat.com> Link: http://lkml.kernel.org/r/71c7ab36456855d11ae07edd4945a7dfe80f9915.1424822291.git.luto@amacapital.net Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:
parent
719d359dc7
commit
08571f1ae3
|
@ -364,18 +364,12 @@ static int set_segment_reg(struct task_struct *task,
|
||||||
case offsetof(struct user_regs_struct,cs):
|
case offsetof(struct user_regs_struct,cs):
|
||||||
if (unlikely(value == 0))
|
if (unlikely(value == 0))
|
||||||
return -EIO;
|
return -EIO;
|
||||||
#ifdef CONFIG_IA32_EMULATION
|
task_pt_regs(task)->cs = value;
|
||||||
if (test_tsk_thread_flag(task, TIF_IA32))
|
|
||||||
task_pt_regs(task)->cs = value;
|
|
||||||
#endif
|
|
||||||
break;
|
break;
|
||||||
case offsetof(struct user_regs_struct,ss):
|
case offsetof(struct user_regs_struct,ss):
|
||||||
if (unlikely(value == 0))
|
if (unlikely(value == 0))
|
||||||
return -EIO;
|
return -EIO;
|
||||||
#ifdef CONFIG_IA32_EMULATION
|
task_pt_regs(task)->ss = value;
|
||||||
if (test_tsk_thread_flag(task, TIF_IA32))
|
|
||||||
task_pt_regs(task)->ss = value;
|
|
||||||
#endif
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue