Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1671015
| From | Richard Weinberger <richard@nod.at> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: um: PTRACE_SETREGSET failure with XSTATE on Kabylake CPU |
| Date | 2017-06-20 20:20 +0200 |
| Message-ID | <tUvUR-3DD-19@gated-at.bofh.it> (permalink) |
| References | <tUgCu-27M-9@gated-at.bofh.it> <tUliO-5a4-11@gated-at.bofh.it> <tUnaZ-6kQ-93@gated-at.bofh.it> <tUnkC-6DB-15@gated-at.bofh.it> <tUvLc-3zj-19@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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 -EINVAL?) >>> >>> Ideas? > > We considered allowing a partial XSAVE buffer for PTRACE_SETREGSET, but > it was that the XSAVE instruction requires a full-size buffer led to > this choice. Using a smaller buffer for XSAVE causes a fault. So, this code is not supposed to work? iov.iov_base = fp_regs; iov.iov_len = sizeof(struct _xstate); ptrace(PTRACE_GETREGSET, pid, NT_X86_XSTATE, &iov); ptrace(PTRACE_SETREGSET, pid, NT_X86_XSTATE, &iov); This is what UML does and on Thomas's new Laptop PTRACE_SETREGSET is failing. Thanks, //richard
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
um: PTRACE_SETREGSET failure with XSTATE on Kabylake CPU Thomas Meyer <thomas@m3y3r.de> - 2017-06-20 04:00 +0200
Re: um: PTRACE_SETREGSET failure with XSTATE on Kabylake CPU Richard Weinberger <richard@nod.at> - 2017-06-20 09:00 +0200
Re: um: PTRACE_SETREGSET failure with XSTATE on Kabylake CPU Thomas Meyer <thomas@m3y3r.de> - 2017-06-20 11:00 +0200
Re: um: PTRACE_SETREGSET failure with XSTATE on Kabylake CPU Richard Weinberger <richard@nod.at> - 2017-06-20 11:10 +0200
Re: um: PTRACE_SETREGSET failure with XSTATE on Kabylake CPU Yu-cheng Yu <yu-cheng.yu@intel.com> - 2017-06-20 20:10 +0200
Re: um: PTRACE_SETREGSET failure with XSTATE on Kabylake CPU Richard Weinberger <richard@nod.at> - 2017-06-20 20:20 +0200
Re: um: PTRACE_SETREGSET failure with XSTATE on Kabylake CPU Richard Weinberger <richard@nod.at> - 2017-06-20 21:00 +0200
Re: um: PTRACE_SETREGSET failure with XSTATE on Kabylake CPU Yu-cheng Yu <yu-cheng.yu@intel.com> - 2017-06-20 22:00 +0200
Re: um: PTRACE_SETREGSET failure with XSTATE on Kabylake CPU Thomas Meyer <thomas@m3y3r.de> - 2017-06-20 22:20 +0200
csiph-web