Hi,

The x86_64-cs in utrace wiki page reports that the test could crash kernel. I verify that in old kernel release 2.6.24.
But in latest kernel 2.6.25-rc1, the problem seems to be resolved.

The call tree :
        arch_ptrace -> putreg-> set_segment_reg

In function set_segment_reg, the related code is like:

                /*
                 * Can't actually change these in 64-bit mode.
                 */
        case offsetof(struct user_regs_struct,cs):
                if (unlikely(value == 0))
                        return -EIO;
#ifdef CONFIG_IA32_EMULATION
                if (test_tsk_thread_flag(task, TIF_IA32))
                        task_pt_regs(task)->cs = value;
#endif
                break;

In fact, the cs register won't be written in x86_64. And I also find the test passed in i386 environment.

Regards,
Wenji


Reply via email to