| #
48a656c5
|
| 13-Jun-2025 |
Mark Johnston <markj@FreeBSD.org> |
linux: Fix usage of ptrace(PT_GET_SC_ARGS)
The native handler expects the argument to be a pointer to an array of 8 syscall arguments, whereas the emulation provided an array that holds up to 6.
Ha
linux: Fix usage of ptrace(PT_GET_SC_ARGS)
The native handler expects the argument to be a pointer to an array of 8 syscall arguments, whereas the emulation provided an array that holds up to 6.
Handle this by adding a new range of Linuxulator-specific ptrace commands. In particular, introduce PTLINUX_GET_SC_ARGS, which always copies exactly six arguments. This fixes the problem and removes the hack of checking the target thread ABI to decide whether to apply a Linux-specific quirk to PT_GET_SC_ARGS.
Reviewed by: kib MFC after: 2 weeks Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D50758
show more ...
|
| #
3460fab5
|
| 18-Aug-2023 |
Dmitry Chagin <dchagin@FreeBSD.org> |
linux(4): Remove sys/cdefs.h inclusion where it's not needed due to 685dc743
|
| #
685dc743
|
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Remove $FreeBSD$: one-line .c pattern
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
|
| #
3d0addcd
|
| 18-May-2023 |
Dmitry Chagin <dchagin@FreeBSD.org> |
linux(4): Make ptrace_pokeusr machine dependent
Differential Revision: https://reviews.freebsd.org/D40096 MFC after: 1 week
|
| #
dd2a6cd7
|
| 18-May-2023 |
Dmitry Chagin <dchagin@FreeBSD.org> |
linux(4): Make ptrace_peekusr machine dependend
And partially implement it for x86_64.
Differential Revision: https://reviews.freebsd.org/D40095 MFC after: 1 week
|
| #
4d846d26
|
| 10-May-2023 |
Warner Losh <imp@FreeBSD.org> |
spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of
spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of BSD-2-Clause.
Discussed with: pfg MFC After: 3 days Sponsored by: Netflix
show more ...
|
| #
fe6db727
|
| 21-Jan-2022 |
Konstantin Belousov <kib@FreeBSD.org> |
Add security.bsd.allow_ptrace sysctl
that disables any access to ptrace(2) for all processes.
Reviewed by: emaste Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https
Add security.bsd.allow_ptrace sysctl
that disables any access to ptrace(2) for all processes.
Reviewed by: emaste Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D33986
show more ...
|
| #
06d5ef0a
|
| 13-Nov-2021 |
Edward Tomasz Napierala <trasz@FreeBSD.org> |
linux: Drop some unnecessary includes
Drop some unnecessary includes from Linuxulator ptrace and coredump code. No functional changes.
Sponsored By: EPSRC Differential Revision: https://reviews.fr
linux: Drop some unnecessary includes
Drop some unnecessary includes from Linuxulator ptrace and coredump code. No functional changes.
Sponsored By: EPSRC Differential Revision: https://reviews.freebsd.org/D32925
show more ...
|
| #
0bf8d5d5
|
| 09-Nov-2021 |
Edward Tomasz Napierala <trasz@FreeBSD.org> |
linux: Replace ifdefs in ptrace with per-architecture callbacks
It's a cleanup; no (intended) functional changes.
Sponsored By: EPSRC Reviewed By: kib Differential Revision: https://reviews.freebsd
linux: Replace ifdefs in ptrace with per-architecture callbacks
It's a cleanup; no (intended) functional changes.
Sponsored By: EPSRC Reviewed By: kib Differential Revision: https://reviews.freebsd.org/D32888
show more ...
|
| #
a90ff3c4
|
| 07-Nov-2021 |
Edward Tomasz Napierala <trasz@FreeBSD.org> |
linux: Add ptrace(2) support on arm64
This moves linux_ptrace.c from sys/amd64/linux/ to sys/compat/linux/, making it possible to use it on architectures other than amd64. It also enables Linux ptra
linux: Add ptrace(2) support on arm64
This moves linux_ptrace.c from sys/amd64/linux/ to sys/compat/linux/, making it possible to use it on architectures other than amd64. It also enables Linux ptrace(2) on arm64.
Relnotes: yes Sponsored By: EPSRC Differential Revision: https://reviews.freebsd.org/D32868
show more ...
|
| #
3be6e606
|
| 06-Nov-2021 |
Edward Tomasz Napierala <trasz@FreeBSD.org> |
linux: Fix another amd64-specific piece of linux_ptrace.c
This was missed in c91d0e59be1. No functional changes.
Sponsored By: EPSRC
|
| #
c91d0e59
|
| 03-Nov-2021 |
Edward Tomasz Napierala <trasz@FreeBSD.org> |
linux: Make linux_ptrace.c portable
Make sys/amd64/linux/linux_ptrace.c machine-independent, in preparation for moving it into sys/compat/linux/. No functional changes.
Reviewed By: kib Sponsored B
linux: Make linux_ptrace.c portable
Make sys/amd64/linux/linux_ptrace.c machine-independent, in preparation for moving it into sys/compat/linux/. No functional changes.
Reviewed By: kib Sponsored By: EPSRC Differential Revision: https://reviews.freebsd.org/D32756
show more ...
|
| #
f0d9a6a7
|
| 30-Oct-2021 |
Edward Tomasz Napierala <trasz@FreeBSD.org> |
linux: make PTRACE_SETREGS use a correct struct
Note that this is largely untested at this point, as was the previous version; I'm committing this mostly to get rid of `struct linux_pt_reg`.
Sponso
linux: make PTRACE_SETREGS use a correct struct
Note that this is largely untested at this point, as was the previous version; I'm committing this mostly to get rid of `struct linux_pt_reg`.
Sponsored By: EPSRC Differential Revision: https://reviews.freebsd.org/D32735
show more ...
|
| #
ad037966
|
| 29-Oct-2021 |
Edward Tomasz Napierala <trasz@FreeBSD.org> |
linux: make PTRACE_GETREGS return correct struct
Previously it returned a shorter struct. I can't find any modern software that uses it, but tests/ptrace from strace(1) repo complained.
Differenti
linux: make PTRACE_GETREGS return correct struct
Previously it returned a shorter struct. I can't find any modern software that uses it, but tests/ptrace from strace(1) repo complained.
Differential Revision: https://reviews.freebsd.org/D32601
show more ...
|
| #
f939dccf
|
| 29-Oct-2021 |
Edward Tomasz Napierala <trasz@FreeBSD.org> |
linux: Make PTRACE_GETREGSET return proper buffer size
This fixes Chrome warning:
[1022/152319.328632:ERROR:ptracer.cc(476)] Unexpected registers size 0 != 216, 68
Reviewed By: emaste Sponsored By
linux: Make PTRACE_GETREGSET return proper buffer size
This fixes Chrome warning:
[1022/152319.328632:ERROR:ptracer.cc(476)] Unexpected registers size 0 != 216, 68
Reviewed By: emaste Sponsored By: EPSRC Differential Revision: https://reviews.freebsd.org/D32616
show more ...
|
| #
6547153e
|
| 29-Oct-2021 |
Edward Tomasz Napierala <trasz@FreeBSD.org> |
linux: Fix ptrace panic with ERESTART
Translate ERESTART into Linux "internal" errno ERESTARTSYS. This fixes the erestartsys.gen.test from strace(1).
Reviewed By: kib Sponsored By: EPSRC Differenti
linux: Fix ptrace panic with ERESTART
Translate ERESTART into Linux "internal" errno ERESTARTSYS. This fixes the erestartsys.gen.test from strace(1).
Reviewed By: kib Sponsored By: EPSRC Differential Revision: https://reviews.freebsd.org/D32623
show more ...
|
| #
2ec26ae4
|
| 23-Oct-2021 |
Edward Tomasz Napierala <trasz@FreeBSD.org> |
linux: Improve debug for PTRACE_GETEVENTMSG
No functional changes.
Sponsored By: EPSRC
|
| #
6e66030c
|
| 23-Oct-2021 |
Edward Tomasz Napierala <trasz@FreeBSD.org> |
linux: implement PTRACE_EVENT_EXEC
This fixes strace(1) from Ubuntu Focal.
Reviewed By: jhb Sponsored By: EPSRC Differential Revision: https://reviews.freebsd.org/D32367
|
| #
2558bb8e
|
| 23-Oct-2021 |
Edward Tomasz Napierala <trasz@FreeBSD.org> |
linux: Make PTRACE_GET_SYSCALL_INFO handle EJUSTRETURN
This fixes panic when trying to run strace(8) from Focal.
Reviewed By: kib Sponsored By: EPSRC Differential Revision: https://reviews.freebsd.
linux: Make PTRACE_GET_SYSCALL_INFO handle EJUSTRETURN
This fixes panic when trying to run strace(8) from Focal.
Reviewed By: kib Sponsored By: EPSRC Differential Revision: https://reviews.freebsd.org/D32355
show more ...
|
| #
e3a83df1
|
| 22-Oct-2021 |
Edward Tomasz Napierala <trasz@FreeBSD.org> |
linux: Improve debug for PTRACE_GETREGSET
No functional changes.
Sponsored By: EPSRC
|
| #
a03d4d73
|
| 17-Oct-2021 |
Edward Tomasz Napierala <trasz@FreeBSD.org> |
linux: Improve debugging for PTRACE_GETREGSET
It's triggered by gdb(1).
Sponsored By: EPSRC Differential Revision: https://reviews.freebsd.org/D32456
|
| #
f9246e14
|
| 17-Oct-2021 |
Edward Tomasz Napierala <trasz@FreeBSD.org> |
linux: Implement some bits of PTRACE_PEEKUSER
This makes Linux gdb from Bionic a little less broken.
Sponsored By: EPSRC Differential Revision: https://reviews.freebsd.org/D32455
|
| #
75a9d95b
|
| 17-Oct-2021 |
Edward Tomasz Napierala <trasz@FreeBSD.org> |
linux: Adjust PTRACE_GET_SYSCALL_INFO buffer size semantics
The tests/ptrace_syscall_info test from strace(1) complained about this.
Sponsored By: EPSRC Differential Revision: https://reviews.freeb
linux: Adjust PTRACE_GET_SYSCALL_INFO buffer size semantics
The tests/ptrace_syscall_info test from strace(1) complained about this.
Sponsored By: EPSRC Differential Revision: https://reviews.freebsd.org/D32368
show more ...
|
| #
f575573c
|
| 15-Sep-2021 |
Konstantin Belousov <kib@FreeBSD.org> |
Remove PT_GET_SC_ARGS_ALL
Reimplement bdf0f24bb16d556a5b by checking for the caller' ABI in the implementation of PT_GET_SC_ARGS, and copying out everything if it is Linuxolator.
Also fix a minor i
Remove PT_GET_SC_ARGS_ALL
Reimplement bdf0f24bb16d556a5b by checking for the caller' ABI in the implementation of PT_GET_SC_ARGS, and copying out everything if it is Linuxolator.
Also fix a minor information leak: if PT_GET_SC_ARGS_ALL is done on the thread reused after other process, it allows to read some number of that thread last syscall arguments. Clear td_sa.args in thread_alloc().
Reviewed by: jhb Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D31968
show more ...
|
| #
bdf0f24b
|
| 12-Sep-2021 |
Edward Tomasz Napierala <trasz@FreeBSD.org> |
linux: implement PTRACE_GET_SYSCALL_INFO
This is one of the pieces required to make modern (ie Focal) strace(1) work.
Reviewed By: jhb (earlier version) Sponsored by: EPSRC Differential Revision: h
linux: implement PTRACE_GET_SYSCALL_INFO
This is one of the pieces required to make modern (ie Focal) strace(1) work.
Reviewed By: jhb (earlier version) Sponsored by: EPSRC Differential Revision: https://reviews.freebsd.org/D28212
show more ...
|