Revision tags: release/14.0.0 |
|
#
eb32c1c7 |
| 02-Nov-2023 |
Andrew Turner <andrew@FreeBSD.org> |
sysent: Add sv_protect
To allow for architecture specific protections add sv_protect to struct sysent. This can be used to apply these after the executable is loaded into the new address space.
Rev
sysent: Add sv_protect
To allow for architecture specific protections add sv_protect to struct sysent. This can be used to apply these after the executable is loaded into the new address space.
Reviewed by: kib Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D42440
show more ...
|
#
7ec361d6 |
| 03-Oct-2023 |
Dmitry Chagin <dchagin@FreeBSD.org> |
sysent: Trim trailing whitespaces
MFC after: 1 week
|
#
b82b4ae7 |
| 25-Sep-2023 |
Konstantin Belousov <kib@FreeBSD.org> |
sysentvec: add SV_SIGSYS flag
to allow ABIs to indicate that SIGSYS is needed. Mark all native FreeBSD ABIs with the flag.
This implicitly marks Linux' ABIs as not delivering SIGSYS on invalid sys
sysentvec: add SV_SIGSYS flag
to allow ABIs to indicate that SIGSYS is needed. Mark all native FreeBSD ABIs with the flag.
This implicitly marks Linux' ABIs as not delivering SIGSYS on invalid syscall.
Reviewed by: dchagin, markj Discussed with: jhb Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D41976
show more ...
|
#
39024a89 |
| 25-Sep-2023 |
Konstantin Belousov <kib@FreeBSD.org> |
syscalls: fix missing SIGSYS for several ENOSYS errors
In particular, when the syscall number is too large, or when syscall is dynamic. For that, add nosys_sysent structure to pass fake sysent to s
syscalls: fix missing SIGSYS for several ENOSYS errors
In particular, when the syscall number is too large, or when syscall is dynamic. For that, add nosys_sysent structure to pass fake sysent to syscall top code.
Reviewed by: dchagin, markj Discussed with: jhb Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D41976
show more ...
|
#
95ee2897 |
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Remove $FreeBSD$: two-line .h pattern
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
|
#
d706d02e |
| 29-May-2023 |
Dmitry Chagin <dchagin@FreeBSD.org> |
sysentvec: Retire sv_imgact_try as unneeded anymore
The sysentvec sv_imgact_try was used by kern_exec() to allow non-native ABI to fixup shell path according to ABI root directory. Since the non-nat
sysentvec: Retire sv_imgact_try as unneeded anymore
The sysentvec sv_imgact_try was used by kern_exec() to allow non-native ABI to fixup shell path according to ABI root directory. Since the non-native ABI can now specify its root directory directly to namei() via pwd_altroot() call this facility is not needed anymore.
Differential Revision: https://reviews.freebsd.org/D40092 MFC after: 2 month
show more ...
|
Revision tags: release/13.2.0, release/12.4.0 |
|
#
361971fb |
| 02-Jun-2022 |
Kornel Dulęba <kd@FreeBSD.org> |
Rework how shared page related data is stored
Store the shared page address in struct vmspace. Also instead of storing absolute addresses of various shared page segments save their offsets with resp
Rework how shared page related data is stored
Store the shared page address in struct vmspace. Also instead of storing absolute addresses of various shared page segments save their offsets with respect to the shared page address. This will be more useful when the shared page address is randomized.
Approved by: mw(mentor) Sponsored by: Stormshield Obtained from: Semihalf Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D35393
show more ...
|
#
eca368ec |
| 20-May-2022 |
Dmitry Chagin <dchagin@FreeBSD.org> |
Retire sv_transtrap
Call translate_traps directly from sendsig().
MFC after: 2 weeks
|
Revision tags: release/13.1.0 |
|
#
548a2ec4 |
| 24-Jan-2022 |
Andrew Turner <andrew@FreeBSD.org> |
Add PT_GETREGSET
This adds the PT_GETREGSET and PT_SETREGSET ptrace types. These can be used to access all the registers from a specified core dump note type. The NT_PRSTATUS and NT_FPREGSET notes a
Add PT_GETREGSET
This adds the PT_GETREGSET and PT_SETREGSET ptrace types. These can be used to access all the registers from a specified core dump note type. The NT_PRSTATUS and NT_FPREGSET notes are initially supported. Other machine-dependant types are expected to be added in the future.
The ptrace addr points to a struct iovec pointing at memory to hold the registers along with its length. On success the length in the iovec is updated to tell userspace the actual length the kernel wrote or, if the base address is NULL, the length the kernel would have written.
Because the data field is an int the arguments are backwards when compared to the Linux PTRACE_GETREGSET call.
Reviewed by: kib Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D19831
show more ...
|
#
758d98de |
| 17-Jan-2022 |
Mark Johnston <markj@FreeBSD.org> |
exec: Remove the stack gap implementation
ASLR stack randomization will reappear in a forthcoming commit. Rather than inserting a random gap into the stack mapping, the entire stack mapping itself
exec: Remove the stack gap implementation
ASLR stack randomization will reappear in a forthcoming commit. Rather than inserting a random gap into the stack mapping, the entire stack mapping itself will be randomized in the same way that other mappings are when ASLR is enabled.
No functional change intended, as the stack gap implementation is currently disabled by default.
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 ...
|
Revision tags: release/12.3.0 |
|
#
01c77a43 |
| 11-Nov-2021 |
Konstantin Belousov <kib@FreeBSD.org> |
Pass vdso address to userspace
Reviewed by: emaste Discussed with: jrtc27 Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 month Differential revision: https://reviews.freebsd.org/D3
Pass vdso address to userspace
Reviewed by: emaste Discussed with: jrtc27 Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 month Differential revision: https://reviews.freebsd.org/D32960
show more ...
|
#
ab4524b3 |
| 05-Nov-2021 |
Konstantin Belousov <kib@FreeBSD.org> |
amd64: wrap 64bit sigtramp into vdso
Reviewed by: emaste Discussed with: jrtc27 Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 month Differential revision: https://reviews.freebsd.
amd64: wrap 64bit sigtramp into vdso
Reviewed by: emaste Discussed with: jrtc27 Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 month Differential revision: https://reviews.freebsd.org/D32960
show more ...
|
#
a8efd4d1 |
| 29-Nov-2021 |
Brooks Davis <brooks@FreeBSD.org> |
syscalls: make syscall and __syscall SYSMUX
Rather than combining the declearation of nosys with the registration of SYS_syscall, declare syscall(2) and __syscall(2) with the new SYSMUX type in sysc
syscalls: make syscall and __syscall SYSMUX
Rather than combining the declearation of nosys with the registration of SYS_syscall, declare syscall(2) and __syscall(2) with the new SYSMUX type in syscalls.master and declare nosys directly. This eliminates the last use of syscall aliases in the tree.
Reviewed by: kib, imp
show more ...
|
#
1c696903 |
| 20-Oct-2021 |
Konstantin Belousov <kib@FreeBSD.org> |
Unmap shared page manually before doing vm_map_remove() on exit or exec
This allows the pmap_remove(min, max) call to see empty pmap and exploit empty pmap optimization.
Reviewed by: markj Tested b
Unmap shared page manually before doing vm_map_remove() on exit or exec
This allows the pmap_remove(min, max) call to see empty pmap and exploit empty pmap optimization.
Reviewed by: markj Tested by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D32569
show more ...
|
#
889b56c8 |
| 13-Oct-2021 |
Dawid Gorecki <dgr@semihalf.com> |
setrlimit: Take stack gap into account.
Calling setrlimit with stack gap enabled and with low values of stack resource limit often caused the program to abort immediately after exiting the syscall.
setrlimit: Take stack gap into account.
Calling setrlimit with stack gap enabled and with low values of stack resource limit often caused the program to abort immediately after exiting the syscall. This happened due to the fact that the resource limit was calculated assuming that the stack started at sv_usrstack, while with stack gap enabled the stack is moved by a random number of bytes.
Save information about stack size in struct vmspace and adjust the rlim_cur value. If the rlim_cur and stack gap is bigger than rlim_max, then the value is truncated to rlim_max.
PR: 253208 Reviewed by: kib Obtained from: Semihalf Sponsored by: Stormshield MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D31516
show more ...
|
#
397f1889 |
| 13-Sep-2021 |
Konstantin Belousov <kib@FreeBSD.org> |
Remove SV_CAPSICUM
It was only needed for cloudabi
Reviewed by: emaste Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D31923
|
#
cf0ee873 |
| 13-Sep-2021 |
Konstantin Belousov <kib@FreeBSD.org> |
Drop cloudabi
According to https://github.com/NuxiNL/cloudlibc: CloudABI is no longer being maintained. It was an awesome experiment, but it never got enough traction to be sustainable.
There is no
Drop cloudabi
According to https://github.com/NuxiNL/cloudlibc: CloudABI is no longer being maintained. It was an awesome experiment, but it never got enough traction to be sustainable.
There is no reason to keep it in FreeBSD.
Approved by: ed (private mail) Reviewed by: emaste Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D31923
show more ...
|
#
de8374df |
| 12-Aug-2021 |
Dmitry Chagin <dchagin@FreeBSD.org> |
fork: Allow ABI to specify fork return values for child.
At least Linux x86 ABI's does not use carry bit and expects that the dx register is preserved. For this add a new sv_set_fork_retval hook and
fork: Allow ABI to specify fork return values for child.
At least Linux x86 ABI's does not use carry bit and expects that the dx register is preserved. For this add a new sv_set_fork_retval hook and call it from cpu_fork().
Add a short comment about touching dx in x86_set_fork_retval(), for more details see phab comments from kib@ and imp@.
Reviewed by: kib Differential revision: https://reviews.freebsd.org/D31472 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 ...
|
#
28a66fc3 |
| 01-Jul-2021 |
Konstantin Belousov <kib@FreeBSD.org> |
Do not call FreeBSD-ABI specific code for all ABIs
Use sysentvec hooks to only call umtx_thread_exit/umtx_exec, which handle robust mutexes, for native FreeBSD ABI. Similarly, there is no sense in
Do not call FreeBSD-ABI specific code for all ABIs
Use sysentvec hooks to only call umtx_thread_exit/umtx_exec, which handle robust mutexes, for native FreeBSD ABI. Similarly, there is no sense in calling sigfastblock_clear() for non-native ABIs.
Requested by: dchagin Reviewed by: dchagin, markj (previous version) Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Differential revision: https://reviews.freebsd.org/D30987
show more ...
|
#
71ab3445 |
| 01-Jul-2021 |
Konstantin Belousov <kib@FreeBSD.org> |
Add sv_onexec_old() sysent hook for exec event
Unlike sv_onexec(), it is called from the old (pre-exec) sysentvec structure. The old vmspace for the process is still intact during the call.
Reviewe
Add sv_onexec_old() sysent hook for exec event
Unlike sv_onexec(), it is called from the old (pre-exec) sysentvec structure. The old vmspace for the process is still intact during the call.
Reviewed by: dchagin, markj Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Differential revision: https://reviews.freebsd.org/D30987
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 ...
|
#
a12e901a |
| 05-Jun-2021 |
Konstantin Belousov <kib@FreeBSD.org> |
Add a knob to disable dequeueing SIGCHLD on waiting for live process
It seems that Linux does not dequeue siginfo for SIGCHLD when wait*(2) reports status of the running process. In particular, sig
Add a knob to disable dequeueing SIGCHLD on waiting for live process
It seems that Linux does not dequeue siginfo for SIGCHLD when wait*(2) reports status of the running process. In particular, sigwaitinfo(2) and other signal querying syscalls can observe the siginfo after wait.
FreeBSD dequeued siginfo from the beginning, so we cannot change the default ABI to be more compatible. Still, add a knob to enable to change to the other behavior for debugging purposes.
Reported by: dchagin Reviewed by: dchagin, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D30675
show more ...
|
#
bc387624 |
| 05-Jun-2021 |
Konstantin Belousov <kib@FreeBSD.org> |
Add a knob to not drop signal with default ignored or ignored actions
Traditionally, BSD drops signals with the default action during send, not even putting them to the destination process queue. T
Add a knob to not drop signal with default ignored or ignored actions
Traditionally, BSD drops signals with the default action during send, not even putting them to the destination process queue. This semantic is not shared with other operating systems (Linux), which do queue such signals. In particular, sigtimedwait(2) and related syscalls can observe the delivery.
Add a global knob kern.sig_discard_ign which can be set to false to force enqueuing of the signals with default action. Also add an ABI flag to indicate that signals should be queued.
Note that it is not practical to run with the knob turned on, because almost all software that care about the delivery of such signals, is aware of the difference, and misbehaves if the signals are actually queued. The purpose of the knob as is is to allow for easier diagnostic of the programs that need the adjustments, to confirm the cause of problem.
Reported by: dchagin Reviewed by: dchagin, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D30675
show more ...
|