Re: [PATCHv2] x86/mm: set x32 syscall bit in SET_PERSONALITY()

2017-03-21 Thread Dmitry Safonov
On 03/21/2017 10:24 PM, Cyrill Gorcunov wrote: On Tue, Mar 21, 2017 at 10:19:01PM +0300, Dmitry Safonov wrote: indeed, thanks! Also, even more simple-minded: for now we could just check binary magic from /proc/.../exe, for now stopping on x32 binaries. File may not exist and elfheader

Re: [PATCHv2] x86/mm: set x32 syscall bit in SET_PERSONALITY()

2017-03-21 Thread Dmitry Safonov
On 03/21/2017 10:24 PM, Cyrill Gorcunov wrote: On Tue, Mar 21, 2017 at 10:19:01PM +0300, Dmitry Safonov wrote: indeed, thanks! Also, even more simple-minded: for now we could just check binary magic from /proc/.../exe, for now stopping on x32 binaries. File may not exist and elfheader

Re: [PATCHv2] x86/mm: set x32 syscall bit in SET_PERSONALITY()

2017-03-21 Thread Dmitry Safonov
On 03/21/2017 09:40 PM, Cyrill Gorcunov wrote: On Tue, Mar 21, 2017 at 09:09:40PM +0300, Dmitry Safonov wrote: I guess the question comes from that we're releasing CRIU 3.0 with 32-bit C/R and some other cool stuff, but we don't support x32 yet. As we don't want release a thing that we aren't

Re: [PATCHv2] x86/mm: set x32 syscall bit in SET_PERSONALITY()

2017-03-21 Thread Dmitry Safonov
On 03/21/2017 09:40 PM, Cyrill Gorcunov wrote: On Tue, Mar 21, 2017 at 09:09:40PM +0300, Dmitry Safonov wrote: I guess the question comes from that we're releasing CRIU 3.0 with 32-bit C/R and some other cool stuff, but we don't support x32 yet. As we don't want release a thing that we aren't

Re: [PATCHv2] x86/mm: set x32 syscall bit in SET_PERSONALITY()

2017-03-21 Thread Dmitry Safonov
On 03/21/2017 10:42 PM, Dmitry Safonov wrote: On 03/21/2017 10:31 PM, Andy Lutomirski wrote: On Tue, Mar 21, 2017 at 11:09 AM, Dmitry Safonov wrote: On 03/21/2017 08:45 PM, Andy Lutomirski wrote: On Tue, Mar 21, 2017 at 10:17 AM, Cyrill Gorcunov

Re: [PATCHv2] x86/mm: set x32 syscall bit in SET_PERSONALITY()

2017-03-21 Thread Dmitry Safonov
On 03/21/2017 10:42 PM, Dmitry Safonov wrote: On 03/21/2017 10:31 PM, Andy Lutomirski wrote: On Tue, Mar 21, 2017 at 11:09 AM, Dmitry Safonov wrote: On 03/21/2017 08:45 PM, Andy Lutomirski wrote: On Tue, Mar 21, 2017 at 10:17 AM, Cyrill Gorcunov wrote: On Tue, Mar 21, 2017 at 07:37:12PM

Re: [PATCHv2] x86/mm: set x32 syscall bit in SET_PERSONALITY()

2017-03-21 Thread Dmitry Safonov
On 03/21/2017 10:31 PM, Andy Lutomirski wrote: On Tue, Mar 21, 2017 at 11:09 AM, Dmitry Safonov wrote: On 03/21/2017 08:45 PM, Andy Lutomirski wrote: On Tue, Mar 21, 2017 at 10:17 AM, Cyrill Gorcunov wrote: On Tue, Mar 21, 2017 at 07:37:12PM

Re: [PATCHv2] x86/mm: set x32 syscall bit in SET_PERSONALITY()

2017-03-21 Thread Dmitry Safonov
On 03/21/2017 10:31 PM, Andy Lutomirski wrote: On Tue, Mar 21, 2017 at 11:09 AM, Dmitry Safonov wrote: On 03/21/2017 08:45 PM, Andy Lutomirski wrote: On Tue, Mar 21, 2017 at 10:17 AM, Cyrill Gorcunov wrote: On Tue, Mar 21, 2017 at 07:37:12PM +0300, Dmitry Safonov wrote: ... diff --git

Re: [PATCHv2] x86/mm: set x32 syscall bit in SET_PERSONALITY()

2017-03-21 Thread Cyrill Gorcunov
On Tue, Mar 21, 2017 at 12:31:51PM -0700, Andy Lutomirski wrote: ... > > I guess the question comes from that we're releasing CRIU 3.0 with > > 32-bit C/R and some other cool stuff, but we don't support x32 yet. > > As we don't want release a thing that we aren't properly testing. > > So for a

Re: [PATCHv2] x86/mm: set x32 syscall bit in SET_PERSONALITY()

2017-03-21 Thread Cyrill Gorcunov
On Tue, Mar 21, 2017 at 12:31:51PM -0700, Andy Lutomirski wrote: ... > > I guess the question comes from that we're releasing CRIU 3.0 with > > 32-bit C/R and some other cool stuff, but we don't support x32 yet. > > As we don't want release a thing that we aren't properly testing. > > So for a

Re: [PATCHv2] x86/mm: set x32 syscall bit in SET_PERSONALITY()

2017-03-21 Thread Andy Lutomirski
On Tue, Mar 21, 2017 at 11:09 AM, Dmitry Safonov wrote: > On 03/21/2017 08:45 PM, Andy Lutomirski wrote: >> >> On Tue, Mar 21, 2017 at 10:17 AM, Cyrill Gorcunov >> wrote: >>> >>> On Tue, Mar 21, 2017 at 07:37:12PM +0300, Dmitry Safonov wrote: >>> ...

Re: [PATCHv2] x86/mm: set x32 syscall bit in SET_PERSONALITY()

2017-03-21 Thread Andy Lutomirski
On Tue, Mar 21, 2017 at 11:09 AM, Dmitry Safonov wrote: > On 03/21/2017 08:45 PM, Andy Lutomirski wrote: >> >> On Tue, Mar 21, 2017 at 10:17 AM, Cyrill Gorcunov >> wrote: >>> >>> On Tue, Mar 21, 2017 at 07:37:12PM +0300, Dmitry Safonov wrote: >>> ... diff --git

Re: [PATCHv2] x86/mm: set x32 syscall bit in SET_PERSONALITY()

2017-03-21 Thread Cyrill Gorcunov
On Tue, Mar 21, 2017 at 10:19:01PM +0300, Dmitry Safonov wrote: > > > > indeed, thanks! > > Also, even more simple-minded: for now we could just check binary magic > from /proc/.../exe, for now stopping on x32 binaries. File may not exist and elfheader wiped out as well.

Re: [PATCHv2] x86/mm: set x32 syscall bit in SET_PERSONALITY()

2017-03-21 Thread Cyrill Gorcunov
On Tue, Mar 21, 2017 at 10:19:01PM +0300, Dmitry Safonov wrote: > > > > indeed, thanks! > > Also, even more simple-minded: for now we could just check binary magic > from /proc/.../exe, for now stopping on x32 binaries. File may not exist and elfheader wiped out as well.

Re: [PATCHv2] x86/mm: set x32 syscall bit in SET_PERSONALITY()

2017-03-21 Thread hpa
On March 21, 2017 12:07:13 PM PDT, Cyrill Gorcunov wrote: >On Tue, Mar 21, 2017 at 11:51:09AM -0700, h...@zytor.com wrote: >> > >> >indeed, thanks! >> >> I proposed to the ptrace people a virtual register for this and a few >other things, but it got bikeshed to death. > >Any

Re: [PATCHv2] x86/mm: set x32 syscall bit in SET_PERSONALITY()

2017-03-21 Thread hpa
On March 21, 2017 12:07:13 PM PDT, Cyrill Gorcunov wrote: >On Tue, Mar 21, 2017 at 11:51:09AM -0700, h...@zytor.com wrote: >> > >> >indeed, thanks! >> >> I proposed to the ptrace people a virtual register for this and a few >other things, but it got bikeshed to death. > >Any mail reference left?

Re: [PATCHv2] x86/mm: set x32 syscall bit in SET_PERSONALITY()

2017-03-21 Thread Cyrill Gorcunov
On Tue, Mar 21, 2017 at 11:51:09AM -0700, h...@zytor.com wrote: > > > >indeed, thanks! > > I proposed to the ptrace people a virtual register for this and a few other > things, but it got bikeshed to death. Any mail reference left? Would like to read it.

Re: [PATCHv2] x86/mm: set x32 syscall bit in SET_PERSONALITY()

2017-03-21 Thread Cyrill Gorcunov
On Tue, Mar 21, 2017 at 11:51:09AM -0700, h...@zytor.com wrote: > > > >indeed, thanks! > > I proposed to the ptrace people a virtual register for this and a few other > things, but it got bikeshed to death. Any mail reference left? Would like to read it.

Re: [PATCHv2] x86/mm: set x32 syscall bit in SET_PERSONALITY()

2017-03-21 Thread hpa
On March 21, 2017 10:45:57 AM PDT, Andy Lutomirski wrote: >On Tue, Mar 21, 2017 at 10:17 AM, Cyrill Gorcunov >wrote: >> On Tue, Mar 21, 2017 at 07:37:12PM +0300, Dmitry Safonov wrote: >> ... >>> diff --git a/arch/x86/kernel/process_64.c

Re: [PATCHv2] x86/mm: set x32 syscall bit in SET_PERSONALITY()

2017-03-21 Thread hpa
On March 21, 2017 10:45:57 AM PDT, Andy Lutomirski wrote: >On Tue, Mar 21, 2017 at 10:17 AM, Cyrill Gorcunov >wrote: >> On Tue, Mar 21, 2017 at 07:37:12PM +0300, Dmitry Safonov wrote: >> ... >>> diff --git a/arch/x86/kernel/process_64.c >b/arch/x86/kernel/process_64.c >>> index

Re: [PATCHv2] x86/mm: set x32 syscall bit in SET_PERSONALITY()

2017-03-21 Thread hpa
On March 21, 2017 11:40:58 AM PDT, Cyrill Gorcunov wrote: >On Tue, Mar 21, 2017 at 09:09:40PM +0300, Dmitry Safonov wrote: >> >> I guess the question comes from that we're releasing CRIU 3.0 with >> 32-bit C/R and some other cool stuff, but we don't support x32 yet. >> As we

Re: [PATCHv2] x86/mm: set x32 syscall bit in SET_PERSONALITY()

2017-03-21 Thread hpa
On March 21, 2017 11:40:58 AM PDT, Cyrill Gorcunov wrote: >On Tue, Mar 21, 2017 at 09:09:40PM +0300, Dmitry Safonov wrote: >> >> I guess the question comes from that we're releasing CRIU 3.0 with >> 32-bit C/R and some other cool stuff, but we don't support x32 yet. >> As we don't want release a

Re: [PATCHv2] x86/mm: set x32 syscall bit in SET_PERSONALITY()

2017-03-21 Thread Cyrill Gorcunov
On Tue, Mar 21, 2017 at 09:09:40PM +0300, Dmitry Safonov wrote: > > I guess the question comes from that we're releasing CRIU 3.0 with > 32-bit C/R and some other cool stuff, but we don't support x32 yet. > As we don't want release a thing that we aren't properly testing. > So for a while we

Re: [PATCHv2] x86/mm: set x32 syscall bit in SET_PERSONALITY()

2017-03-21 Thread Cyrill Gorcunov
On Tue, Mar 21, 2017 at 09:09:40PM +0300, Dmitry Safonov wrote: > > I guess the question comes from that we're releasing CRIU 3.0 with > 32-bit C/R and some other cool stuff, but we don't support x32 yet. > As we don't want release a thing that we aren't properly testing. > So for a while we

Re: [PATCHv2] x86/mm: set x32 syscall bit in SET_PERSONALITY()

2017-03-21 Thread Dmitry Safonov
On 03/21/2017 08:45 PM, Andy Lutomirski wrote: On Tue, Mar 21, 2017 at 10:17 AM, Cyrill Gorcunov wrote: On Tue, Mar 21, 2017 at 07:37:12PM +0300, Dmitry Safonov wrote: ... diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c index

Re: [PATCHv2] x86/mm: set x32 syscall bit in SET_PERSONALITY()

2017-03-21 Thread Dmitry Safonov
On 03/21/2017 08:45 PM, Andy Lutomirski wrote: On Tue, Mar 21, 2017 at 10:17 AM, Cyrill Gorcunov wrote: On Tue, Mar 21, 2017 at 07:37:12PM +0300, Dmitry Safonov wrote: ... diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c index d6b784a5520d..d3d4d9abcaf8 100644 ---

Re: [PATCHv2] x86/mm: set x32 syscall bit in SET_PERSONALITY()

2017-03-21 Thread Andy Lutomirski
On Tue, Mar 21, 2017 at 10:17 AM, Cyrill Gorcunov wrote: > On Tue, Mar 21, 2017 at 07:37:12PM +0300, Dmitry Safonov wrote: > ... >> diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c >> index d6b784a5520d..d3d4d9abcaf8 100644 >> ---

Re: [PATCHv2] x86/mm: set x32 syscall bit in SET_PERSONALITY()

2017-03-21 Thread Andy Lutomirski
On Tue, Mar 21, 2017 at 10:17 AM, Cyrill Gorcunov wrote: > On Tue, Mar 21, 2017 at 07:37:12PM +0300, Dmitry Safonov wrote: > ... >> diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c >> index d6b784a5520d..d3d4d9abcaf8 100644 >> --- a/arch/x86/kernel/process_64.c >> +++

Re: [PATCHv2] x86/mm: set x32 syscall bit in SET_PERSONALITY()

2017-03-21 Thread Dmitry Safonov
On 03/21/2017 08:27 PM, h...@zytor.com wrote: On March 21, 2017 9:37:12 AM PDT, Dmitry Safonov wrote: After my changes to mmap(), its code now relies on the bitness of performing syscall. According to that, it chooses the base of allocation: mmap_base for 64-bit mmap()

Re: [PATCHv2] x86/mm: set x32 syscall bit in SET_PERSONALITY()

2017-03-21 Thread Dmitry Safonov
On 03/21/2017 08:27 PM, h...@zytor.com wrote: On March 21, 2017 9:37:12 AM PDT, Dmitry Safonov wrote: After my changes to mmap(), its code now relies on the bitness of performing syscall. According to that, it chooses the base of allocation: mmap_base for 64-bit mmap() and mmap_compat_base for

Re: [PATCHv2] x86/mm: set x32 syscall bit in SET_PERSONALITY()

2017-03-21 Thread hpa
On March 21, 2017 9:37:12 AM PDT, Dmitry Safonov wrote: >After my changes to mmap(), its code now relies on the bitness of >performing syscall. According to that, it chooses the base of >allocation: >mmap_base for 64-bit mmap() and mmap_compat_base for 32-bit syscall. >It

Re: [PATCHv2] x86/mm: set x32 syscall bit in SET_PERSONALITY()

2017-03-21 Thread hpa
On March 21, 2017 9:37:12 AM PDT, Dmitry Safonov wrote: >After my changes to mmap(), its code now relies on the bitness of >performing syscall. According to that, it chooses the base of >allocation: >mmap_base for 64-bit mmap() and mmap_compat_base for 32-bit syscall. >It was done by: > commit

Re: [PATCHv2] x86/mm: set x32 syscall bit in SET_PERSONALITY()

2017-03-21 Thread Cyrill Gorcunov
On Tue, Mar 21, 2017 at 07:37:12PM +0300, Dmitry Safonov wrote: ... > diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c > index d6b784a5520d..d3d4d9abcaf8 100644 > --- a/arch/x86/kernel/process_64.c > +++ b/arch/x86/kernel/process_64.c > @@ -519,8 +519,14 @@ void

Re: [PATCHv2] x86/mm: set x32 syscall bit in SET_PERSONALITY()

2017-03-21 Thread Cyrill Gorcunov
On Tue, Mar 21, 2017 at 07:37:12PM +0300, Dmitry Safonov wrote: ... > diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c > index d6b784a5520d..d3d4d9abcaf8 100644 > --- a/arch/x86/kernel/process_64.c > +++ b/arch/x86/kernel/process_64.c > @@ -519,8 +519,14 @@ void

[PATCHv2] x86/mm: set x32 syscall bit in SET_PERSONALITY()

2017-03-21 Thread Dmitry Safonov
After my changes to mmap(), its code now relies on the bitness of performing syscall. According to that, it chooses the base of allocation: mmap_base for 64-bit mmap() and mmap_compat_base for 32-bit syscall. It was done by: commit 1b028f784e8c ("x86/mm: Introduce mmap_compat_base() for 32-bit

[PATCHv2] x86/mm: set x32 syscall bit in SET_PERSONALITY()

2017-03-21 Thread Dmitry Safonov
After my changes to mmap(), its code now relies on the bitness of performing syscall. According to that, it chooses the base of allocation: mmap_base for 64-bit mmap() and mmap_compat_base for 32-bit syscall. It was done by: commit 1b028f784e8c ("x86/mm: Introduce mmap_compat_base() for 32-bit