<feed xmlns='http://www.w3.org/2005/Atom'>
<title>wireguard-linux/arch/xtensa/kernel/ptrace.c, branch jd/unified-crypt-queue</title>
<subtitle>WireGuard for the Linux kernel</subtitle>
<id>https://git.zx2c4.com/wireguard-linux/atom/arch/xtensa/kernel/ptrace.c?h=jd%2Funified-crypt-queue</id>
<link rel='self' href='https://git.zx2c4.com/wireguard-linux/atom/arch/xtensa/kernel/ptrace.c?h=jd%2Funified-crypt-queue'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/'/>
<updated>2019-11-29T23:47:54Z</updated>
<entry>
<title>xtensa: fix system_call interaction with ptrace</title>
<updated>2019-11-29T23:47:54Z</updated>
<author>
<name>Max Filippov</name>
<email>jcmvbkbc@gmail.com</email>
</author>
<published>2019-11-29T22:54:06Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=02ce94c229251555ac726ecfebe3458ef5905fa9'/>
<id>urn:sha1:02ce94c229251555ac726ecfebe3458ef5905fa9</id>
<content type='text'>
Don't overwrite return value if system call was cancelled at entry by
ptrace. Return status code from do_syscall_trace_enter so that
pt_regs::syscall doesn't need to be changed to skip syscall.

Signed-off-by: Max Filippov &lt;jcmvbkbc@gmail.com&gt;
</content>
</entry>
<entry>
<title>xtensa: implement syscall tracepoints</title>
<updated>2018-12-17T21:50:25Z</updated>
<author>
<name>Max Filippov</name>
<email>jcmvbkbc@gmail.com</email>
</author>
<published>2018-11-12T05:51:49Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=af5395c214c15c18de3decf2229373a8c88c4fde'/>
<id>urn:sha1:af5395c214c15c18de3decf2229373a8c88c4fde</id>
<content type='text'>
Add TIF_SYSCALL_TRACEPOINT flag definition; add _TIF_SYSCALL_TRACEPOINT
to _TIF_WORK_MASK. Call trace_sys_enter from do_syscall_trace_enter and
trace_sys_exit from do_syscall_trace_leave when TIF_SYSCALL_TRACEPOINT
flag is set.
Add declaration of sys_call_table to arch/xtensa/include/asm/syscall.h
Add definition of NR_syscalls to arch/xtensa/include/asm/unistd.h
Select HAVE_SYSCALL_TRACEPOINTS.

This change allows tracing each syscall entry and exit through the
ftrace mechanism.

Signed-off-by: Max Filippov &lt;jcmvbkbc@gmail.com&gt;
</content>
</entry>
<entry>
<title>xtensa: implement TIE regset</title>
<updated>2018-12-17T21:48:22Z</updated>
<author>
<name>Max Filippov</name>
<email>jcmvbkbc@gmail.com</email>
</author>
<published>2018-11-25T05:36:11Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=1819afcc0b1327a470898e0a76100884969aff17'/>
<id>urn:sha1:1819afcc0b1327a470898e0a76100884969aff17</id>
<content type='text'>
Put all coprocessors and non-coprocessor TIE state into the REGSET_TIE.
Mark TIE regset with NT_PRFPREG note type.
Reimplement ptrace_getxregs and ptrace_setxregs using REGSET_TIE.

Signed-off-by: Max Filippov &lt;jcmvbkbc@gmail.com&gt;
</content>
</entry>
<entry>
<title>xtensa: implement task_user_regset_view</title>
<updated>2018-12-17T21:48:21Z</updated>
<author>
<name>Max Filippov</name>
<email>jcmvbkbc@gmail.com</email>
</author>
<published>2018-11-10T03:32:06Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=06fbac8e8971f2fa526e189304dd95ee62f39dbe'/>
<id>urn:sha1:06fbac8e8971f2fa526e189304dd95ee62f39dbe</id>
<content type='text'>
- define struct user_pt_regs in the arch/xtensa/include/uapi/asm/ptrace.h
  with the same layout as xtensa_gregset_t; make xtensa_gregset_t a
  typedef;
- define REGSET_GPR regset, implement register get and set functions;
- define task_user_regset_view function and expose REGSET_GPR.

Signed-off-by: Max Filippov &lt;jcmvbkbc@gmail.com&gt;
</content>
</entry>
<entry>
<title>xtensa: call do_syscall_trace_{enter,leave} selectively</title>
<updated>2018-12-17T21:48:21Z</updated>
<author>
<name>Max Filippov</name>
<email>jcmvbkbc@gmail.com</email>
</author>
<published>2018-11-16T03:33:47Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=3aee3e25deeab083df21012060c98e9987ac9177'/>
<id>urn:sha1:3aee3e25deeab083df21012060c98e9987ac9177</id>
<content type='text'>
Check whether calls to do_syscall_trace_{enter,leave} are necessary in
the system_call function. Define _TIF_WORK_MASK to a bitmask of flags
that reuire the calls. Fix comment.

Signed-off-by: Max Filippov &lt;jcmvbkbc@gmail.com&gt;
</content>
</entry>
<entry>
<title>xtensa: use NO_SYSCALL instead of -1</title>
<updated>2018-12-17T21:48:21Z</updated>
<author>
<name>Max Filippov</name>
<email>jcmvbkbc@gmail.com</email>
</author>
<published>2018-11-09T23:43:14Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=6a986984b63990c80252b2208036fe731a6ae113'/>
<id>urn:sha1:6a986984b63990c80252b2208036fe731a6ae113</id>
<content type='text'>
For the sake of clarity define macro NO_SYSCALL and use it for
setting/checking struct pt_regs::syscall field.

Signed-off-by: Max Filippov &lt;jcmvbkbc@gmail.com&gt;
</content>
</entry>
<entry>
<title>xtensa: drop custom PTRACE_{PEEK,POKE}{TEXT,DATA}</title>
<updated>2018-12-03T09:39:23Z</updated>
<author>
<name>Max Filippov</name>
<email>jcmvbkbc@gmail.com</email>
</author>
<published>2018-11-25T04:51:52Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=633f1ffbccc752a867e41f4d312c19ef2c3d1b22'/>
<id>urn:sha1:633f1ffbccc752a867e41f4d312c19ef2c3d1b22</id>
<content type='text'>
Custom implementations of these ptrace calls are the same as generic
implementations. Drop custom code and use generic.

Signed-off-by: Max Filippov &lt;jcmvbkbc@gmail.com&gt;
</content>
</entry>
<entry>
<title>xtensa: fix coprocessor part of ptrace_{get,set}xregs</title>
<updated>2018-11-27T02:37:51Z</updated>
<author>
<name>Max Filippov</name>
<email>jcmvbkbc@gmail.com</email>
</author>
<published>2018-11-27T02:06:01Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=38a35a78c5e270cbe53c4fef6b0d3c2da90dd849'/>
<id>urn:sha1:38a35a78c5e270cbe53c4fef6b0d3c2da90dd849</id>
<content type='text'>
Layout of coprocessor registers in the elf_xtregs_t and
xtregs_coprocessor_t may be different due to alignment. Thus it is not
always possible to copy data between the xtregs_coprocessor_t structure
and the elf_xtregs_t and get correct values for all registers.
Use a table of offsets and sizes of individual coprocessor register
groups to do coprocessor context copying in the ptrace_getxregs and
ptrace_setxregs.
This fixes incorrect coprocessor register values reading from the user
process by the native gdb on an xtensa core with multiple coprocessors
and registers with high alignment requirements.

Cc: stable@vger.kernel.org
Signed-off-by: Max Filippov &lt;jcmvbkbc@gmail.com&gt;
</content>
</entry>
<entry>
<title>signal/ptrace: Add force_sig_ptrace_errno_trap and use it where needed</title>
<updated>2018-01-23T01:07:11Z</updated>
<author>
<name>Eric W. Biederman</name>
<email>ebiederm@xmission.com</email>
</author>
<published>2018-01-22T20:37:25Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=f71dd7dc2dc989dc712b246a74d243e4b2c5f8a7'/>
<id>urn:sha1:f71dd7dc2dc989dc712b246a74d243e4b2c5f8a7</id>
<content type='text'>
There are so many places that build struct siginfo by hand that at
least one of them is bound to get it wrong.  A handful of cases in the
kernel arguably did just that when using the errno field of siginfo to
pass no errno values to userspace.  The usage is limited to a single
si_code so at least does not mess up anything else.

Encapsulate this questionable pattern in a helper function so
that the userspace ABI is preserved.

Update all of the places that use this pattern to use the new helper
function.

Signed-off-by: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
</content>
</entry>
<entry>
<title>xtensa: use generic tracehooks</title>
<updated>2017-05-01T14:00:10Z</updated>
<author>
<name>Max Filippov</name>
<email>jcmvbkbc@gmail.com</email>
</author>
<published>2015-03-16T11:40:14Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=f984409a00e7d9aa40af64d7c9619e5de3d980bf'/>
<id>urn:sha1:f984409a00e7d9aa40af64d7c9619e5de3d980bf</id>
<content type='text'>
Use tracehook_report_syscall_{entry,exit} instead of a local copy of it
in do_syscall_trace. Allow tracehook to cancel syscall by returning
invalid syscall number to the system_call function.

Signed-off-by: Max Filippov &lt;jcmvbkbc@gmail.com&gt;
</content>
</entry>
</feed>
