From: Oleg Nesterov <oleg@redhat.com>
To: Andy Lutomirski <luto@kernel.org>
Cc: x86@kernel.org,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Kees Cook <keescook@chromium.org>, Borislav Petkov <bp@alien8.de>
Subject: Re: [PATCH] x86/ptrace: Remove questionable TS_COMPAT usage in ptrace
Date: Sun, 19 Jun 2016 23:19:07 +0200 [thread overview]
Message-ID: <20160619211906.GA14712@redhat.com> (raw)
In-Reply-To: <94bda8cd5f326ae5591c80fb5d7c1c22624accec.1466244711.git.luto@kernel.org>
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.
next prev parent reply other threads:[~2016-06-19 22:21 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-18 10:21 Andy Lutomirski
2016-06-18 13:55 ` Pedro Alves
2016-06-18 14:41 ` Pedro Alves
2016-06-18 17:02 ` Andy Lutomirski
2016-06-19 22:09 ` Andy Lutomirski
2016-06-20 10:27 ` Pedro Alves
2016-06-20 15:24 ` Oleg Nesterov
2016-06-20 16:30 ` Andy Lutomirski
2016-06-20 16:14 ` Oleg Nesterov
2016-06-20 17:25 ` Andy Lutomirski
2016-06-20 10:07 ` Pedro Alves
2016-06-20 11:12 ` Jan Kratochvil
2016-06-18 17:48 ` Kees Cook
2016-06-19 21:19 ` Oleg Nesterov [this message]
2016-06-19 22:23 ` Andy Lutomirski
2016-06-20 6:12 ` Andy Lutomirski
2016-06-20 15:31 ` Oleg Nesterov
2016-06-20 17:53 ` the usage of __SYSCALL_MASK in entry_SYSCALL_64/do_syscall_64 is not consistent Oleg Nesterov
2016-06-21 19:01 ` Kees Cook
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160619211906.GA14712@redhat.com \
--to=oleg@redhat.com \
--cc=bp@alien8.de \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome