#
390c9ea0 |
| 15-May-2022 |
Dmitry Chagin <dchagin@FreeBSD.org> |
linux(4): Add AT_MINSIGSTKSZ to arm64 port
MFC after: 2 weeks
|
#
c56480a8 |
| 15-May-2022 |
Dmitry Chagin <dchagin@FreeBSD.org> |
linux(4): Implement signal trampoline for arm64 in a FreeBSD-way
The implemenation differs from others Linuxulators. For unwinders Linux ucontext_t is stored, however native machine context is used
linux(4): Implement signal trampoline for arm64 in a FreeBSD-way
The implemenation differs from others Linuxulators. For unwinders Linux ucontext_t is stored, however native machine context is used to store/restore process state to avoid code duplication.
As DWARF Aarch64 does not define a register number for PC and provides no direct way to encode the PC of the previous frame, CFI cannot describe a signal trampoline frame. So, modified the vdso linker script to discard unused sections.
Extensions are not implemented.
MFC after: 2 weeks
show more ...
|
#
21f24617 |
| 15-May-2022 |
Dmitry Chagin <dchagin@FreeBSD.org> |
linux(4): Move sigframe definitions to separate headers
The signal trampoine-related definitions are used only in the MD part of code, wherefore moved from everywhere used linux.h to separate MD hea
linux(4): Move sigframe definitions to separate headers
The signal trampoine-related definitions are used only in the MD part of code, wherefore moved from everywhere used linux.h to separate MD headers.
MFC after: 2 weeks
show more ...
|
Revision tags: release/13.1.0 |
|
#
706f4a81 |
| 17-Jan-2022 |
Mark Johnston <markj@FreeBSD.org> |
exec: Introduce the PROC_PS_STRINGS() macro
Rather than fetching the ps_strings address directly from a process' sysentvec, use this macro. With stack address randomization the ps_strings address i
exec: Introduce the PROC_PS_STRINGS() macro
Rather than fetching the ps_strings address directly from a process' sysentvec, use this macro. With stack address randomization the ps_strings address is no longer fixed.
Reviewed by: kib MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D33704
show more ...
|
#
3fc21fdd |
| 17-Jan-2022 |
Mark Johnston <markj@FreeBSD.org> |
sysent: Add a sv_psstringssz field to struct sysentvec
The size of the ps_strings structure varies between ABIs, so this is useful for computing the address of the ps_strings structure relative to t
sysent: Add a sv_psstringssz field to struct sysentvec
The size of the ps_strings structure varies between ABIs, so this is useful for computing the address of the ps_strings structure relative to the top of the stack when stack address randomization is enabled.
Reviewed by: kib MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D33704
show more ...
|
#
f04a0960 |
| 31-Dec-2021 |
Mark Johnston <markj@FreeBSD.org> |
exec: Simplify sv_copyout_strings implementations a bit
Simplify control flow around handling of the execpath length and signal trampoline. Cache the sysentvec pointer in a local variable.
No func
exec: Simplify sv_copyout_strings implementations a bit
Simplify control flow around handling of the execpath length and signal trampoline. Cache the sysentvec pointer in a local variable.
No functional change intended.
Reviewed by: kib MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D33703
show more ...
|
#
a15c5918 |
| 21-Dec-2021 |
Edward Tomasz Napierala <trasz@FreeBSD.org> |
linux(4): Remove unused arm64 SDT declarations
Those tracepoints have been removed somewhere in the past.
Sponsored By: EPSRC
|
#
adb12675 |
| 08-Dec-2021 |
Brooks Davis <brooks@FreeBSD.org> |
syscall_args: remove MAXARGS define
Use nitems instead and just use a magic `8` for the size of the args array. MAXARGS was rarely used (only in arm64 code) and is an overly generic name to polute
syscall_args: remove MAXARGS define
Use nitems instead and just use a magic `8` for the size of the args array. MAXARGS was rarely used (only in arm64 code) and is an overly generic name to polute the namespace with.
Requested by: kib in D33308
show more ...
|
Revision tags: release/12.3.0 |
|
#
a089c17d |
| 29-Nov-2021 |
Edward Tomasz Napierala <trasz@FreeBSD.org> |
linux(4): Fix "set but not used" warnings
No functional changes.
Sponsored By: EPSRC
|
#
0a4b664a |
| 12-Aug-2021 |
Dmitry Chagin <dchagin@FreeBSD.org> |
linux(4): Add struct clone_args for future clone3 system call.
In preparation for clone3 system call add struct clone_args and use it in clone implementation. Move all of clone related bits to the n
linux(4): Add struct clone_args for future clone3 system call.
In preparation for clone3 system call add struct clone_args and use it in clone implementation. Move all of clone related bits to the newly created linux_fork.h header.
Differential revision: https://reviews.freebsd.org/D31474 MFC after: 2 weeks
show more ...
|
#
ccc510b4 |
| 25-Jul-2021 |
Edward Tomasz Napierala <trasz@FreeBSD.org> |
linux: implement signal delivery on arm64
Note that this still uses FreeBSD-style sigframe; this will be addressed later.
Reviewed By: dchagin Sponsored By: EPSRC Differential Revision: https://rev
linux: implement signal delivery on arm64
Note that this still uses FreeBSD-style sigframe; this will be addressed later.
Reviewed By: dchagin Sponsored By: EPSRC Differential Revision: https://reviews.freebsd.org/D31258
show more ...
|
#
ae8330b4 |
| 20-Jul-2021 |
Dmitry Chagin <dchagin@FreeBSD.org> |
linux(4): Add arch name to the some printfs.
Reviewed by: emaste Differential revision: https://reviews.freebsd.org/D30904 MFC after: 2 weeks
|
#
09cffde9 |
| 20-Jul-2021 |
Dmitry Chagin <dchagin@FreeBSD.org> |
linux(4): Fixup the vDSO initialization order.
The vDSO initialisation order should be as follows: - native abi init via exec_sysvec_init(); - vDSO symbols queued to the linux_vdso_syms list; - linu
linux(4): Fixup the vDSO initialization order.
The vDSO initialisation order should be as follows: - native abi init via exec_sysvec_init(); - vDSO symbols queued to the linux_vdso_syms list; - linux_vdso_install(); - linux_exec_sysvec_init();
As the exec_sysvec_init() called with SI_ORDER_ANY (last) at SI_SUB_EXEC order, move linux_vdso_install() and linux_exec_sysvec_init() to the SI_SUB_EXEC+1 order.
Reviewed by: trasz Differential Revision: https://reviews.freebsd.org/D30902 MFC after 2 weeks
show more ...
|
#
9931033b |
| 20-Jul-2021 |
Dmitry Chagin <dchagin@FreeBSD.org> |
linux(4); Almost complete the vDSO.
The vDSO (virtual dynamic shared object) is a small shared library that the kernel maps R/O into the address space of all Linux processes on image activation. The
linux(4); Almost complete the vDSO.
The vDSO (virtual dynamic shared object) is a small shared library that the kernel maps R/O into the address space of all Linux processes on image activation. The vDSO is a fully formed ELF image, shared by all processes with the same ABI, has no process private data.
The primary purpose of the vDSO: - non-executable stack, signal trampolines not copied to the stack; - signal trampolines unwind, mandatory for the NPTL; - to avoid contex-switch overhead frequently used system calls can be implemented in the vDSO: for now gettimeofday, clock_gettime.
The first two have been implemented, so add the implementation of system calls.
System calls implemenation based on a native timekeeping code with some limitations: - ifunc can't be used, as vDSO r/o mapped to the process VA and rtld can't relocate symbols; - reading HPET memory is not implemented for now (TODO).
In case on any error vDSO system calls fallback to the kernel system calls. For unimplemented vDSO system calls added prototypes which call corresponding kernel system call.
Tested by: trasz (arm64) Differential revision: https://reviews.freebsd.org/D30900 MFC after: 2 weeks
show more ...
|
#
5fd9cd53 |
| 20-Jul-2021 |
Dmitry Chagin <dchagin@FreeBSD.org> |
linux(4): Modify sv_onexec hook to return an error.
Temporary add stubs to the Linux emulation layer which calls the existing hook.
Reviewed by: kib Differential Revision: https://reviews.freebsd.
linux(4): Modify sv_onexec hook to return an error.
Temporary add stubs to the Linux emulation layer which calls the existing hook.
Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D30911 MFC after: 2 weeks
show more ...
|
#
cf98bc28 |
| 10-Jul-2021 |
David Chisnall <theraven@FreeBSD.org> |
Pass the syscall number to capsicum permission-denied signals
The syscall number is stored in the same register as the syscall return on amd64 (and possibly other architectures) and so it is impossi
Pass the syscall number to capsicum permission-denied signals
The syscall number is stored in the same register as the syscall return on amd64 (and possibly other architectures) and so it is impossible to recover in the signal handler after the call has returned. This small tweak delivers it in the `si_value` field of the signal, which is sufficient to catch capability violations and emulate them with a call to a more-privileged process in the signal handler.
This reapplies 3a522ba1bc852c3d4660a4fa32e4a94999d09a47 with a fix for the static assertion failure on i386.
Approved by: markj (mentor)
Reviewed by: kib, bcr (manpages)
Differential Revision: https://reviews.freebsd.org/D29185
show more ...
|
#
84a3963d |
| 13-Jul-2021 |
Edward Tomasz Napierala <trasz@FreeBSD.org> |
linux(4): remove unfinished vsyscall bits on arm64
The vsyscall mechanism is obsolete.
Reviewed By: dchagin, emaste Sponsored By: EPSRC Differential Revision: https://reviews.freebsd.org/D31091
|
#
d2b55828 |
| 10-Jul-2021 |
David Chisnall <theraven@FreeBSD.org> |
Revert "Pass the syscall number to capsicum permission-denied signals"
This broke the i386 build.
This reverts commit 3a522ba1bc852c3d4660a4fa32e4a94999d09a47.
|
#
3a522ba1 |
| 10-Jul-2021 |
David Chisnall <theraven@FreeBSD.org> |
Pass the syscall number to capsicum permission-denied signals
The syscall number is stored in the same register as the syscall return on amd64 (and possibly other architectures) and so it is impossi
Pass the syscall number to capsicum permission-denied signals
The syscall number is stored in the same register as the syscall return on amd64 (and possibly other architectures) and so it is impossible to recover in the signal handler after the call has returned. This small tweak delivers it in the `si_value` field of the signal, which is sufficient to catch capability violations and emulate them with a call to a more-privileged process in the signal handler.
Approved by: markj (mentor)
Reviewed by: kib, bcr (manpages)
Differential Revision: https://reviews.freebsd.org/D29185
show more ...
|
#
45d99014 |
| 03-Jul-2021 |
Edward Tomasz Napierala <trasz@FreeBSD.org> |
linux(4): implement coredumps on arm64
Previously they only worked on amd64.
Sponsored By: EPSRC Differential Revision: https://reviews.freebsd.org/D30975
|
#
93c3453f |
| 01-Jul-2021 |
Edward Tomasz Napierala <trasz@FreeBSD.org> |
linux(4): revert arm64 part of 447636e43c0
The arm64 part of the patch was incomplete and prevented linux64.ko from loading due to missing symbol.
Sponsored By: EPSRC
|
#
447636e4 |
| 30-Jun-2021 |
Edward Tomasz Napierala <trasz@FreeBSD.org> |
linux(4): implement coredump support
Implement dumping core for Linux binaries on amd64, for both 32- and 64-bit executables. Some bits are still missing.
This is based on a prototype by chuck@.
linux(4): implement coredump support
Implement dumping core for Linux binaries on amd64, for both 32- and 64-bit executables. Some bits are still missing.
This is based on a prototype by chuck@.
Reviewed By: kib Sponsored By: EPSRC Differential Revision: https://reviews.freebsd.org/D30019
show more ...
|
#
435754a5 |
| 29-Jun-2021 |
Edward Tomasz Napierala <trasz@FreeBSD.org> |
Add infrastructure required for Linux coredump support
This adds `sv_elf_core_osabi`, `sv_elf_core_abi_vendor`, and `sv_elf_core_prepare_notes` fields to `struct sysentvec`, and modifies imgact_elf.
Add infrastructure required for Linux coredump support
This adds `sv_elf_core_osabi`, `sv_elf_core_abi_vendor`, and `sv_elf_core_prepare_notes` fields to `struct sysentvec`, and modifies imgact_elf.c to make use of them instead of hardcoding FreeBSD-specific values. It also updates all of the ABI definitions to preserve current behaviour.
This makes it possible to implement non-native ELF coredump support without unnecessary code duplication. It will be used for Linux coredumps.
Reviewed By: kib Sponsored By: EPSRC Differential Revision: https://reviews.freebsd.org/D30921
show more ...
|
#
c1da89fe |
| 22-Jun-2021 |
Dmitry Chagin <dchagin@FreeBSD.org> |
linux(4): Retire linux_kplatform.
Assuming we can't run on i486, i586 class cpu, retire linux_kplatform var and use hardcoded 'machine' value in linux_newuname().
I have added linux_kplatform for c
linux(4): Retire linux_kplatform.
Assuming we can't run on i486, i586 class cpu, retire linux_kplatform var and use hardcoded 'machine' value in linux_newuname().
I have added linux_kplatform for consistency with linux_platform which is placed in to vdso to avoid excess copyout it on stack for AT_PLATFORM at exec time.
This is the first stage of Linuxulator's vdso revision.
Reviewed by: trasz, imp Differential Revision: https://reviews.freebsd.org/D30774 MFC after: 2 weeks
show more ...
|
#
870e197d |
| 05-Jun-2021 |
Konstantin Belousov <kib@FreeBSD.org> |
Add quirks for Linux ABI signals handling
Require queueing of the signals with default action, and disable dequeueing SIGCHLD on wait for live process.
Reported and tested by: dchagin Reviewed by:
Add quirks for Linux ABI signals handling
Require queueing of the signals with default action, and disable dequeueing SIGCHLD on wait for live process.
Reported and tested by: dchagin Reviewed by: dchagin, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D30675
show more ...
|