Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1418521

Re: [PATCH 5/6] x86/ptrace: down with test_thread_flag(TIF_IA32)

From Andy Lutomirski <luto@amacapital.net>
Newsgroups linux.kernel
Subject Re: [PATCH 5/6] x86/ptrace: down with test_thread_flag(TIF_IA32)
Date 2016-06-09 19:30 +0200
Message-ID <rIbWi-10d-41@gated-at.bofh.it> (permalink)
References <rFedX-qG-13@gated-at.bofh.it> <rFedY-qG-49@gated-at.bofh.it> <rHbbY-2wa-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Jun 6, 2016 3:21 PM, "Oleg Nesterov" <oleg@redhat.com> wrote:
>
> On 06/01, Dmitry Safonov wrote:
> >
> > Note, that this will work only if application has changed it's CS.
>
> So, suppose it changes it's CS and crashes,
>
> > If the application does 32-bit syscall with __USER_CS, ptrace
> > @@ -1355,7 +1355,7 @@ void update_regset_xstate_info(unsigned int size, u64 xstate_mask)
> >  const struct user_regset_view *task_user_regset_view(struct task_struct *task)
> >  {
> >  #ifdef CONFIG_IA32_EMULATION
> > -     if (test_tsk_thread_flag(task, TIF_IA32))
> > +     if (!user_64bit_mode(task_pt_regs(task)))
> >  #endif
>
> then coredump will do fill_elf_header(view->e_machine) and use EM_X86_64
> instead of EM_386, or vice versa...
>
> I simply can't understand is this better or worse, I guess gdb or any
> other tool which looks at this coredump will be confused anyway.
>

I think it's better. CRIU will change CS and someone will make the
restored process crash afterwards.

> Oleg.
>

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/6] x86: 32-bit compatible C/R on x86_64 Dmitry Safonov <dsafonov@virtuozzo.com> - 2016-06-01 15:20 +0200
  [PATCH 5/6] x86/ptrace: down with test_thread_flag(TIF_IA32) Dmitry Safonov <dsafonov@virtuozzo.com> - 2016-06-01 15:20 +0200
    Re: [PATCH 5/6] x86/ptrace: down with test_thread_flag(TIF_IA32) Cyrill Gorcunov <gorcunov@gmail.com> - 2016-06-03 12:00 +0200
      Re: [PATCH 5/6] x86/ptrace: down with test_thread_flag(TIF_IA32) Cyrill Gorcunov <gorcunov@gmail.com> - 2016-06-03 12:50 +0200
    Re: [PATCH 5/6] x86/ptrace: down with test_thread_flag(TIF_IA32) Oleg Nesterov <oleg@redhat.com> - 2016-06-07 00:30 +0200
      Re: [PATCH 5/6] x86/ptrace: down with test_thread_flag(TIF_IA32) Dmitry Safonov <dsafonov@virtuozzo.com> - 2016-06-07 13:40 +0200
      Re: [PATCH 5/6] x86/ptrace: down with test_thread_flag(TIF_IA32) Andy Lutomirski <luto@amacapital.net> - 2016-06-09 19:30 +0200
        Re: [PATCH 5/6] x86/ptrace: down with test_thread_flag(TIF_IA32) Oleg Nesterov <oleg@redhat.com> - 2016-06-10 22:10 +0200
          Re: [PATCH 5/6] x86/ptrace: down with test_thread_flag(TIF_IA32) Andy Lutomirski <luto@amacapital.net> - 2016-06-10 22:20 +0200
  [PATCH 1/6] x86/vdso: unmap vdso blob on vvar mapping failure Dmitry Safonov <dsafonov@virtuozzo.com> - 2016-06-01 15:20 +0200
  [PATCH 3/6] x86/arch_prctl/vdso: add ARCH_MAP_VDSO_* Dmitry Safonov <dsafonov@virtuozzo.com> - 2016-06-01 15:20 +0200

csiph-web