From: Andy Lutomirski <luto@kernel.org>
To: x86@kernel.org, linux-kernel@vger.kernel.org
Cc: Borislav Petkov <bp@alien8.de>, Andy Lutomirski <luto@kernel.org>
Subject: [PATCH v3 0/3] ptrace-vs-syscall-restart fixes, v3
Date: Mon, 20 Jun 2016 16:39:51 -0700 [thread overview]
Message-ID: <cover.1466464928.git.luto@kernel.org> (raw)
Now that I have a complete fix and cleanup that I like, here it is.
Patch 1 is the same as before except for a config-dependent build
fix.
This series is a cleanup and fixes at least two bugs:
- 64-bit gdb attached to a 32-bit program malfunctions if the user
types something like "print foo()" while stopped on exit from an
interrupted ERESTART_RESTARTBLOCK-using syscall.
- A 32-bit tracer that writes orig_eax while the tracee is stopped
at syscall entry will break in_ia32_syscall() and
syscall_get_arch().
After this is applied, it might be safe to drop all of the TS_COMPAT
checks in syscall.h, but I'd want to think carefully about that.
The reason that patch 1 is here at all instead of being folded into
the other patches is that it's intended to be cleanly and safely
backported if needed.
Patch 1 is for 4.7 or 4.8 at the maintainers' discretion. It could
also make sense for -stable -- I thing it fixes a bug that could be
exploited to confuse the syscall auit logs. Patch 2 and 3 are
intended for 4.8.
Pedro, can you try to test this series a bit? I'm having trouble
getting ptrace-tests to pass even on an unmodified kernel.
Andy Lutomirski (3):
x86/ptrace: Stop setting TS_COMPAT in ptrace code
x86/signal: Rewire the restart_block() syscall to have a constant nr
x86/ptrace, x86/signal: Remove TS_I386_REGS_POKED
arch/x86/entry/syscalls/syscall_32.tbl | 2 ++
arch/x86/entry/syscalls/syscall_64.tbl | 3 +++
arch/x86/include/asm/syscall.h | 3 ---
arch/x86/kernel/ptrace.c | 34 +++++++++++++++++++++-------------
arch/x86/kernel/signal.c | 16 ++++++++++------
5 files changed, 36 insertions(+), 22 deletions(-)
--
2.5.5
next reply other threads:[~2016-06-21 0:05 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-20 23:39 Andy Lutomirski [this message]
2016-06-20 23:39 ` [PATCH v3 1/3] x86/ptrace: Stop setting TS_COMPAT in ptrace code Andy Lutomirski
2016-06-22 22:13 ` Oleg Nesterov
2016-07-24 18:47 ` Andy Lutomirski
2016-07-25 6:38 ` Ingo Molnar
2016-07-25 16:38 ` Oleg Nesterov
2016-07-25 16:57 ` Andy Lutomirski
2016-07-26 0:21 ` Andy Lutomirski
2016-06-20 23:39 ` [PATCH v3 2/3] x86/signal: Rewire the restart_block() syscall to have a constant nr Andy Lutomirski
2016-06-21 12:39 ` Pedro Alves
2016-06-21 16:32 ` Andy Lutomirski
2016-06-22 12:00 ` Pedro Alves
2016-06-22 15:20 ` Andy Lutomirski
2016-06-23 21:21 ` Oleg Nesterov
2016-06-20 23:39 ` [PATCH v3 3/3] x86/ptrace, x86/signal: Remove TS_I386_REGS_POKED Andy Lutomirski
2016-06-23 21:26 ` Oleg Nesterov
2016-06-23 21:53 ` Andy Lutomirski
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=cover.1466464928.git.luto@kernel.org \
--to=luto@kernel.org \
--cc=bp@alien8.de \
--cc=linux-kernel@vger.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