Re: um: PTRACE_SETREGSET failure with XSTATE on Kabylake CPU

2017-06-20 Thread Thomas Meyer
> Am 20.06.2017 um 21:53 schrieb Yu-cheng Yu : > >> On Tue, 2017-06-20 at 20:59 +0200, Richard Weinberger wrote: >> Yu-cheng, >> >>> Am 20.06.2017 um 20:17 schrieb Richard Weinberger: >>> Yu-cheng, >>> >>> Am 20.06.2017 um 20:04 schrieb Yu-cheng Yu: >> So to

Re: um: PTRACE_SETREGSET failure with XSTATE on Kabylake CPU

2017-06-20 Thread Thomas Meyer
> Am 20.06.2017 um 21:53 schrieb Yu-cheng Yu : > >> On Tue, 2017-06-20 at 20:59 +0200, Richard Weinberger wrote: >> Yu-cheng, >> >>> Am 20.06.2017 um 20:17 schrieb Richard Weinberger: >>> Yu-cheng, >>> >>> Am 20.06.2017 um 20:04 schrieb Yu-cheng Yu: >> So to summarize: >> >> -

Re: um: PTRACE_SETREGSET failure with XSTATE on Kabylake CPU

2017-06-20 Thread Yu-cheng Yu
On Tue, 2017-06-20 at 20:59 +0200, Richard Weinberger wrote: > Yu-cheng, > > Am 20.06.2017 um 20:17 schrieb Richard Weinberger: > > Yu-cheng, > > > > Am 20.06.2017 um 20:04 schrieb Yu-cheng Yu: > So to summarize: > > - PTRACE_GETREGSET with NT_X86_XSTATE gets 832 and return 832,

Re: um: PTRACE_SETREGSET failure with XSTATE on Kabylake CPU

2017-06-20 Thread Yu-cheng Yu
On Tue, 2017-06-20 at 20:59 +0200, Richard Weinberger wrote: > Yu-cheng, > > Am 20.06.2017 um 20:17 schrieb Richard Weinberger: > > Yu-cheng, > > > > Am 20.06.2017 um 20:04 schrieb Yu-cheng Yu: > So to summarize: > > - PTRACE_GETREGSET with NT_X86_XSTATE gets 832 and return 832,

Re: um: PTRACE_SETREGSET failure with XSTATE on Kabylake CPU

2017-06-20 Thread Richard Weinberger
Yu-cheng, Am 20.06.2017 um 20:17 schrieb Richard Weinberger: > Yu-cheng, > > Am 20.06.2017 um 20:04 schrieb Yu-cheng Yu: So to summarize: - PTRACE_GETREGSET with NT_X86_XSTATE gets 832 and return 832, with no error. - PTRACE_SETREGSET get 832 (sizeof struct _xstate)

Re: um: PTRACE_SETREGSET failure with XSTATE on Kabylake CPU

2017-06-20 Thread Richard Weinberger
Yu-cheng, Am 20.06.2017 um 20:17 schrieb Richard Weinberger: > Yu-cheng, > > Am 20.06.2017 um 20:04 schrieb Yu-cheng Yu: So to summarize: - PTRACE_GETREGSET with NT_X86_XSTATE gets 832 and return 832, with no error. - PTRACE_SETREGSET get 832 (sizeof struct _xstate)

Re: um: PTRACE_SETREGSET failure with XSTATE on Kabylake CPU

2017-06-20 Thread Richard Weinberger
Yu-cheng, Am 20.06.2017 um 20:04 schrieb Yu-cheng Yu: >>> So to summarize: >>> >>> - PTRACE_GETREGSET with NT_X86_XSTATE gets 832 and return 832, with no >>> error. >>> >>> - PTRACE_SETREGSET get 832 (sizeof struct _xstate) but wants at least >>> 1088, otherwise it will fail with -EFAULT (why not

Re: um: PTRACE_SETREGSET failure with XSTATE on Kabylake CPU

2017-06-20 Thread Richard Weinberger
Yu-cheng, Am 20.06.2017 um 20:04 schrieb Yu-cheng Yu: >>> So to summarize: >>> >>> - PTRACE_GETREGSET with NT_X86_XSTATE gets 832 and return 832, with no >>> error. >>> >>> - PTRACE_SETREGSET get 832 (sizeof struct _xstate) but wants at least >>> 1088, otherwise it will fail with -EFAULT (why not

Re: um: PTRACE_SETREGSET failure with XSTATE on Kabylake CPU

2017-06-20 Thread Yu-cheng Yu
On Tue, 2017-06-20 at 11:05 +0200, Richard Weinberger wrote: > [adding x86 folks] > > Am 20.06.2017 um 10:49 schrieb Thomas Meyer: > > > > In UML the first userspace ptrace always fails, so init get's killed. > > > > The check "count < fpu_user_xstate_size" was introduced by commit: > > > >

Re: um: PTRACE_SETREGSET failure with XSTATE on Kabylake CPU

2017-06-20 Thread Yu-cheng Yu
On Tue, 2017-06-20 at 11:05 +0200, Richard Weinberger wrote: > [adding x86 folks] > > Am 20.06.2017 um 10:49 schrieb Thomas Meyer: > > > > In UML the first userspace ptrace always fails, so init get's killed. > > > > The check "count < fpu_user_xstate_size" was introduced by commit: > > > >

Re: um: PTRACE_SETREGSET failure with XSTATE on Kabylake CPU

2017-06-20 Thread Richard Weinberger
[adding x86 folks] Am 20.06.2017 um 10:49 schrieb Thomas Meyer: > Am Dienstag, den 20.06.2017, 08:58 +0200 schrieb Richard Weinberger: >> Thomas, >> >> Am 20.06.2017 um 03:56 schrieb Thomas Meyer: >>> Hi, >>> >>> I finally did figure out where in the host kernel the ptrace >>> syscall >>> fails

Re: um: PTRACE_SETREGSET failure with XSTATE on Kabylake CPU

2017-06-20 Thread Richard Weinberger
[adding x86 folks] Am 20.06.2017 um 10:49 schrieb Thomas Meyer: > Am Dienstag, den 20.06.2017, 08:58 +0200 schrieb Richard Weinberger: >> Thomas, >> >> Am 20.06.2017 um 03:56 schrieb Thomas Meyer: >>> Hi, >>> >>> I finally did figure out where in the host kernel the ptrace >>> syscall >>> fails

Re: um: PTRACE_SETREGSET failure with XSTATE on Kabylake CPU

2017-06-20 Thread Thomas Meyer
Am Dienstag, den 20.06.2017, 08:58 +0200 schrieb Richard Weinberger: > Thomas, > > Am 20.06.2017 um 03:56 schrieb Thomas Meyer: > > Hi, > > > > I finally did figure out where in the host kernel the ptrace > > syscall > > fails with -EFAULT. > > Nice! Thanks a lot for digging into this. I still

Re: um: PTRACE_SETREGSET failure with XSTATE on Kabylake CPU

2017-06-20 Thread Thomas Meyer
Am Dienstag, den 20.06.2017, 08:58 +0200 schrieb Richard Weinberger: > Thomas, > > Am 20.06.2017 um 03:56 schrieb Thomas Meyer: > > Hi, > > > > I finally did figure out where in the host kernel the ptrace > > syscall > > fails with -EFAULT. > > Nice! Thanks a lot for digging into this. I still

Re: um: PTRACE_SETREGSET failure with XSTATE on Kabylake CPU

2017-06-20 Thread Richard Weinberger
Thomas, Am 20.06.2017 um 03:56 schrieb Thomas Meyer: > Hi, > > I finally did figure out where in the host kernel the ptrace syscall > fails with -EFAULT. Nice! Thanks a lot for digging into this. I still had no chance to setup Ipv6 to connect to your host and figure myself. ;-\ > In

Re: um: PTRACE_SETREGSET failure with XSTATE on Kabylake CPU

2017-06-20 Thread Richard Weinberger
Thomas, Am 20.06.2017 um 03:56 schrieb Thomas Meyer: > Hi, > > I finally did figure out where in the host kernel the ptrace syscall > fails with -EFAULT. Nice! Thanks a lot for digging into this. I still had no chance to setup Ipv6 to connect to your host and figure myself. ;-\ > In