[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALCETrWD8cvyNqW_2rxSDd2A345nOv47t+i2JhrCU2V7TpPNBQ@mail.gmail.com>
Date: Thu, 9 Jun 2016 10:21:15 -0700
From: Andy Lutomirski <luto@...capital.net>
To: Oleg Nesterov <oleg@...hat.com>
Cc: Dmitry Safonov <dsafonov@...tuozzo.com>,
"H. Peter Anvin" <hpa@...or.com>,
Dmitry Safonov <0x7f454c46@...il.com>, khorenko@...tuozzo.com,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Thomas Gleixner <tglx@...utronix.de>,
Cyrill Gorcunov <gorcunov@...nvz.org>, xemul@...tuozzo.com,
X86 ML <x86@...nel.org>, Ingo Molnar <mingo@...hat.com>
Subject: Re: [PATCH 5/6] x86/ptrace: down with test_thread_flag(TIF_IA32)
On Jun 6, 2016 3:21 PM, "Oleg Nesterov" <oleg@...hat.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.
>
Powered by blists - more mailing lists