Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1420871 > unrolled thread
| Started by | Oleg Nesterov <oleg@redhat.com> |
|---|---|
| First post | 2016-06-13 16:00 +0200 |
| Last post | 2016-06-14 16:40 +0200 |
| Articles | 3 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH 5/6] x86/ptrace: down with test_thread_flag(TIF_IA32) Oleg Nesterov <oleg@redhat.com> - 2016-06-13 16:00 +0200
Re: [PATCH 5/6] x86/ptrace: down with test_thread_flag(TIF_IA32) Andy Lutomirski <luto@amacapital.net> - 2016-06-13 22:50 +0200
Re: [PATCH 5/6] x86/ptrace: down with test_thread_flag(TIF_IA32) Oleg Nesterov <oleg@redhat.com> - 2016-06-14 16:40 +0200
| From | Oleg Nesterov <oleg@redhat.com> |
|---|---|
| Date | 2016-06-13 16:00 +0200 |
| Subject | Re: [PATCH 5/6] x86/ptrace: down with test_thread_flag(TIF_IA32) |
| Message-ID | <rJAzl-72E-29@gated-at.bofh.it> |
To avoid the confusion, let me first say that I am not going to argue with these changes, I simply do not understand the problem space enough. On 06/10, Andy Lutomirski wrote: > > On Fri, Jun 10, 2016 at 1:07 PM, Oleg Nesterov <oleg@redhat.com> wrote: > > > > IIRC, CRIU can't c/r the 32-bit applications, or this is no longer true? > > > > CRIU has a horrible, nasty, brilliant idea: it will start restoring > 32-bit processes by treating them mostly like 64-bit processes. The > restorer will start out 64-bit, set everything up, and long > jump/return/sigreturn/whatever back to 32-bit mode. OK, I see, > My proposal was > that, rather than coming up with nasty hacks to switch the kernel's > idea of the task bitness, Well, I can't resist but to me SA_IA32_ABI/SA_X32_ABI looks like a hack too. We actually shift TIF_*32 into k_sigaction->flags, and the fact that we do this per-signal looks, well, interesting ;) And at first glance it would be very simple to change the task bitness, CRIU can simply exec a dummy 32-bit application before anything else. In this case (I think) we also do not need do_map_vdso/ARCH_MAP_VDSO_* at least right now. Yes, I guess this will complicate CRIU significantly. > we instead teach the kernel to respect that > actual bitness as indicated by CS and the syscalls used to the extent > possible. I am still not sure the idea to remove TIF_IA32/TIF_X32 is really good. But again, I won't argue, I do not feel I understand pro/cons enough. > So, yes, a restored 32-bit process that crashes should dump core as > though it's 32-bit even though it was 64-bit when execve was last > called :) OK, thanks for you explanation Andy. Oleg.
[toc] | [next] | [standalone]
| From | Andy Lutomirski <luto@amacapital.net> |
|---|---|
| Date | 2016-06-13 22:50 +0200 |
| Message-ID | <rJGY1-2UX-11@gated-at.bofh.it> |
| In reply to | #1420871 |
On Mon, Jun 13, 2016 at 6:50 AM, Oleg Nesterov <oleg@redhat.com> wrote: > To avoid the confusion, let me first say that I am not going to argue > with these changes, I simply do not understand the problem space enough. > > On 06/10, Andy Lutomirski wrote: >> >> On Fri, Jun 10, 2016 at 1:07 PM, Oleg Nesterov <oleg@redhat.com> wrote: >> > >> > IIRC, CRIU can't c/r the 32-bit applications, or this is no longer true? >> > >> >> CRIU has a horrible, nasty, brilliant idea: it will start restoring >> 32-bit processes by treating them mostly like 64-bit processes. The >> restorer will start out 64-bit, set everything up, and long >> jump/return/sigreturn/whatever back to 32-bit mode. > > OK, I see, > >> My proposal was >> that, rather than coming up with nasty hacks to switch the kernel's >> idea of the task bitness, > > Well, I can't resist but to me SA_IA32_ABI/SA_X32_ABI looks like a hack > too. We actually shift TIF_*32 into k_sigaction->flags, and the fact > that we do this per-signal looks, well, interesting ;) Is anything actually wrong with this, though?
[toc] | [prev] | [next] | [standalone]
| From | Oleg Nesterov <oleg@redhat.com> |
|---|---|
| Date | 2016-06-14 16:40 +0200 |
| Message-ID | <rJXFw-62a-27@gated-at.bofh.it> |
| In reply to | #1421298 |
On 06/13, Andy Lutomirski wrote: > > On Mon, Jun 13, 2016 at 6:50 AM, Oleg Nesterov <oleg@redhat.com> wrote: > > > > Well, I can't resist but to me SA_IA32_ABI/SA_X32_ABI looks like a hack > > too. We actually shift TIF_*32 into k_sigaction->flags, and the fact > > that we do this per-signal looks, well, interesting ;) > > Is anything actually wrong with this, though? No, I think the patch is correct... It adds the user-visible change, but I do not think it can break something. Well, perhaps we should also remove SA_IA32_ABI|SA_X32_ABI from oact->sa.sa_flags in do_sigaction() to ensure that these non-uapi flags won't leak to user-space, but probably we do not really care. Oleg.
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web