[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160619211906.GA14712@redhat.com>
Date: Sun, 19 Jun 2016 23:19:07 +0200
From: Oleg Nesterov <oleg@...hat.com>
To: Andy Lutomirski <luto@...nel.org>
Cc: x86@...nel.org,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Kees Cook <keescook@...omium.org>,
Borislav Petkov <bp@...en8.de>
Subject: Re: [PATCH] x86/ptrace: Remove questionable TS_COMPAT usage in
ptrace
Let me first thank Pedro who has already replied!
And I have to admit I will need to re-read his explanations after
sleep to (try to) convince myself I fully understans the problems ;)
Too late for me.
Right now I have nothing to add, but
On 06/18, Andy Lutomirski wrote:
>
> @@ -922,16 +922,7 @@ static int putreg32(struct task_struct *child, unsigned regno, u32 value)
> R32(esp, sp);
>
> case offsetof(struct user32, regs.orig_eax):
> - /*
> - * A 32-bit debugger setting orig_eax means to restore
> - * the state of the task restarting a 32-bit syscall.
> - * Make sure we interpret the -ERESTART* codes correctly
> - * in case the task is not actually still sitting at the
> - * exit from a 32-bit syscall with TS_COMPAT still set.
> - */
> regs->orig_ax = value;
> - if (syscall_get_nr(child, regs) >= 0)
> - task_thread_info(child)->status |= TS_COMPAT;
I agree it would be nice to remove this code, but then it is not clear
how/when we should sign-extend regs->ax..
And this leads to another question, why do we actually need to set/clear
TS_COMPAT in set_personality_ia32() ??
Oleg.
Powered by blists - more mailing lists