Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1611072
| From | Andy Lutomirski <luto@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 1/1] get_nr_restart_syscall() should return __NR_ia32_restart_syscall if __USER32_CS |
| Date | 2017-03-28 17:10 +0200 |
| Message-ID | <tq0UX-12M-59@gated-at.bofh.it> (permalink) |
| References | <tq0UV-12M-15@gated-at.bofh.it> <tq0UV-12M-13@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Tue, Mar 28, 2017 at 7:54 AM, Oleg Nesterov <oleg@redhat.com> wrote: > get_nr_restart_syscall() checks TS_I386_REGS_POKED but this bit is only > set if debugger is 32-bit. If a 64-bit debugger restores the registers > of a 32-bit debugee outside of syscall exit path get_nr_restart_syscall() > wrongly returns __NR_restart_syscall. I had sent a patch that introduced a new syscall nr, but it's not quite safe because it could break seccomp-using programs. But your patch here is also screwy. How about we store the syscall arch to be restored in task_struct along with restart_block? It's not perfect, but it should be 99% of the way there without heuristics as nasty as yours. --Andy P.S. __USER32_CS is the wrong check even if we used your approach. user_64bit_regs() is much better.
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 1/1] get_nr_restart_syscall() should return __NR_ia32_restart_syscall if __USER32_CS Oleg Nesterov <oleg@redhat.com> - 2017-03-28 17:10 +0200
Re: [PATCH 1/1] get_nr_restart_syscall() should return __NR_ia32_restart_syscall if __USER32_CS Andy Lutomirski <luto@kernel.org> - 2017-03-28 17:10 +0200
Re: [PATCH 1/1] get_nr_restart_syscall() should return __NR_ia32_restart_syscall if __USER32_CS Oleg Nesterov <oleg@redhat.com> - 2017-03-28 18:30 +0200
Re: [PATCH 1/1] get_nr_restart_syscall() should return __NR_ia32_restart_syscall if __USER32_CS Andy Lutomirski <luto@amacapital.net> - 2017-03-28 19:20 +0200
Re: [PATCH 1/1] get_nr_restart_syscall() should return __NR_ia32_restart_syscall if __USER32_CS Oleg Nesterov <oleg@redhat.com> - 2017-03-29 17:10 +0200
Re: [PATCH 1/1] get_nr_restart_syscall() should return __NR_ia32_restart_syscall if __USER32_CS Andy Lutomirski <luto@amacapital.net> - 2017-03-29 19:10 +0200
Re: [PATCH 1/1] get_nr_restart_syscall() should return __NR_ia32_restart_syscall if __USER32_CS Oleg Nesterov <oleg@redhat.com> - 2017-03-30 17:30 +0200
Re: [PATCH 1/1] get_nr_restart_syscall() should return __NR_ia32_restart_syscall if __USER32_CS Andy Lutomirski <luto@amacapital.net> - 2017-03-30 20:40 +0200
csiph-web