Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1426803
| From | Andy Lutomirski <luto@amacapital.net> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] x86/ptrace: Remove questionable TS_COMPAT usage in ptrace |
| Date | 2016-06-20 18:50 +0200 |
| Message-ID | <rMayC-2eu-27@gated-at.bofh.it> (permalink) |
| References | <rLlFL-2MV-1@gated-at.bofh.it> <rLoWZ-4M7-1@gated-at.bofh.it> <rLrUR-6T6-9@gated-at.bofh.it> <rLTep-8gB-1@gated-at.bofh.it> <rMaoV-2aV-11@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Mon, Jun 20, 2016 at 8:24 AM, Oleg Nesterov <oleg@redhat.com> wrote: > On 06/19, Andy Lutomirski wrote: >> >> On Sat, Jun 18, 2016 at 10:02 AM, Andy Lutomirski <luto@amacapital.net> wrote: >> Step 1: for 4.7 and for -stable, introduce TS_I386_REGS_POKED. Set it >> in putreg32. Use it in syscall_get_error, get_nr_restart_syscall, >> etc. Clear it in do_signal. > > do_signal() won't be necessarily called... True. But I should have said "clear it in prepare_exit_to_usermode", and the patch I'm just about to send does that. > >> I wonder if we could actually get away with doing syscall restart >> processing before ptrace invocation. > > How? this doesn't look possible or I misunderstood. > > How about the simple change below for now? IIRC 32-bit task can't use > "syscall" so if syscall_get_nr() >= 0 then even the wrong TS_COMPAT is > not that bad, even if it "leaks" to user-mode. Hmm. That should fix the minor security issue, but it will even further break cross-arch tracing: now a 32-bit tracer tracing a 64-bit task that does int $0x80 will malfunction even more than it would have. Also, it relies on bizarre arch details IMO. I think I prefer my version, coming momentarily. --Andy
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] x86/ptrace: Remove questionable TS_COMPAT usage in ptrace Andy Lutomirski <luto@kernel.org> - 2016-06-18 12:30 +0200
Re: [PATCH] x86/ptrace: Remove questionable TS_COMPAT usage in ptrace Pedro Alves <pedro@palves.net> - 2016-06-18 16:00 +0200
Re: [PATCH] x86/ptrace: Remove questionable TS_COMPAT usage in ptrace Pedro Alves <palves@redhat.com> - 2016-06-18 16:50 +0200
Re: [PATCH] x86/ptrace: Remove questionable TS_COMPAT usage in ptrace Andy Lutomirski <luto@amacapital.net> - 2016-06-18 19:10 +0200
Re: [PATCH] x86/ptrace: Remove questionable TS_COMPAT usage in ptrace Andy Lutomirski <luto@amacapital.net> - 2016-06-20 00:20 +0200
Re: [PATCH] x86/ptrace: Remove questionable TS_COMPAT usage in ptrace Pedro Alves <pedro@palves.net> - 2016-06-20 12:30 +0200
Re: [PATCH] x86/ptrace: Remove questionable TS_COMPAT usage in ptrace Oleg Nesterov <oleg@redhat.com> - 2016-06-20 18:40 +0200
Re: [PATCH] x86/ptrace: Remove questionable TS_COMPAT usage in ptrace Andy Lutomirski <luto@amacapital.net> - 2016-06-20 18:50 +0200
Re: [PATCH] x86/ptrace: Remove questionable TS_COMPAT usage in ptrace Oleg Nesterov <oleg@redhat.com> - 2016-06-20 19:20 +0200
Re: [PATCH] x86/ptrace: Remove questionable TS_COMPAT usage in ptrace Andy Lutomirski <luto@amacapital.net> - 2016-06-20 19:30 +0200
Re: [PATCH] x86/ptrace: Remove questionable TS_COMPAT usage in ptrace Pedro Alves <pedro@palves.net> - 2016-06-20 12:10 +0200
Re: [PATCH] x86/ptrace: Remove questionable TS_COMPAT usage in ptrace Jan Kratochvil <jan.kratochvil@redhat.com> - 2016-06-20 13:20 +0200
Re: [PATCH] x86/ptrace: Remove questionable TS_COMPAT usage in ptrace Kees Cook <keescook@chromium.org> - 2016-06-18 19:50 +0200
Re: [PATCH] x86/ptrace: Remove questionable TS_COMPAT usage in ptrace Andy Lutomirski <luto@amacapital.net> - 2016-06-20 00:30 +0200
Re: [PATCH] x86/ptrace: Remove questionable TS_COMPAT usage in ptrace Oleg Nesterov <oleg@redhat.com> - 2016-06-20 00:30 +0200
Re: [PATCH] x86/ptrace: Remove questionable TS_COMPAT usage in ptrace Andy Lutomirski <luto@amacapital.net> - 2016-06-20 08:20 +0200
Re: [PATCH] x86/ptrace: Remove questionable TS_COMPAT usage in ptrace Oleg Nesterov <oleg@redhat.com> - 2016-06-20 18:40 +0200
the usage of __SYSCALL_MASK in entry_SYSCALL_64/do_syscall_64 is not consistent Oleg Nesterov <oleg@redhat.com> - 2016-06-20 20:10 +0200
Re: the usage of __SYSCALL_MASK in entry_SYSCALL_64/do_syscall_64 is not consistent Kees Cook <keescook@chromium.org> - 2016-06-21 21:10 +0200
csiph-web