#
503f752a |
| 04-Jun-2025 |
Brooks Davis <brooks@FreeBSD.org> |
sysent: retire unused SV_IA32
When COMPAT_IA32 was generaliaed to COMPAT_FREEBSD32 in 2010 (commit 841c0c7ec75b), all runtime uses of SV_IA32 were removed in favor of SV_ILP32 check. Given SV_ILP32
sysent: retire unused SV_IA32
When COMPAT_IA32 was generaliaed to COMPAT_FREEBSD32 in 2010 (commit 841c0c7ec75b), all runtime uses of SV_IA32 were removed in favor of SV_ILP32 check. Given SV_ILP32's existance it makes no sense to dynamically check for SV_IA32 (even if we had a 32-bit x86 ABI with 64-bit time_t we needed to differentiate, SV_IA32 would be the wrong spelling.) As such, remove SV_IA32 and mark the bit reserved.
Reviewed by: kib Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D50672
show more ...
|
Revision tags: release/13.4.0-p5, release/13.5.0-p1, release/14.2.0-p3, release/13.5.0, release/14.2.0-p2, release/14.1.0-p8, release/13.4.0-p4, release/14.1.0-p7, release/14.2.0-p1, release/13.4.0-p3, release/14.2.0, release/13.4.0, release/14.1.0 |
|
#
d060b420 |
| 18-Mar-2024 |
Brooks Davis <brooks@FreeBSD.org> |
freebsd32: struct siginfo32 -> struct __siginfo32
In the next commit I will update syscalls.master to use struct __siginfo (which actually exists) so this update will be needed to make generated fil
freebsd32: struct siginfo32 -> struct __siginfo32
In the next commit I will update syscalls.master to use struct __siginfo (which actually exists) so this update will be needed to make generated files (from make sysent) align.
Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D44380
show more ...
|
Revision tags: release/13.3.0, release/14.0.0 |
|
#
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 ...
|
#
685dc743 |
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Remove $FreeBSD$: one-line .c pattern
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\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 ...
|
#
57578dea |
| 29-May-2023 |
Dmitry Chagin <dchagin@FreeBSD.org> |
Brandinfo: Retire emul_path as unneeded anymore
The Barndinfo emul_path was used by the Elf image activator to fixup interpreter file name according to ABI root directory. Since the non-native ABI c
Brandinfo: Retire emul_path as unneeded anymore
The Barndinfo emul_path was used by the Elf image activator to fixup interpreter file name 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/D40091 MFC after: 2 month
show more ...
|
#
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 ...
|
Revision tags: release/13.2.0, release/12.4.0 |
|
#
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 ...
|
#
bd7630ef |
| 14-Jan-2022 |
John Baldwin <jhb@FreeBSD.org> |
ia32: Sync signal context type names with i386.
- Use ia32_freebsd4_* instead of ia32_*4. - Use ia32_o* instead of ia32_*3.
Reviewed by: brooks, imp, kib Sponsored by: The University of Cambridge,
ia32: Sync signal context type names with i386.
- Use ia32_freebsd4_* instead of ia32_*4. - Use ia32_o* instead of ia32_*3.
Reviewed by: brooks, imp, kib Sponsored by: The University of Cambridge, Google Inc. Differential Revision: https://reviews.freebsd.org/D33882
show more ...
|
Revision tags: release/12.3.0 |
|
#
98c8b625 |
| 14-Nov-2021 |
Konstantin Belousov <kib@FreeBSD.org> |
vdso for ia32 on amd64
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
|
#
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 ...
|
#
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 ...
|
#
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 ...
|
Revision tags: release/13.0.0, release/12.2.0 |
|
#
f8e8a06d |
| 10-Oct-2020 |
Conrad Meyer <cem@FreeBSD.org> |
random(4) FenestrasX: Push root seed version to arc4random(3)
Push the root seed version to userspace through the VDSO page, if the RANDOM_FENESTRASX algorithm is enabled. Otherwise, there is no fu
random(4) FenestrasX: Push root seed version to arc4random(3)
Push the root seed version to userspace through the VDSO page, if the RANDOM_FENESTRASX algorithm is enabled. Otherwise, there is no functional change. The mechanism can be disabled with debug.fxrng_vdso_enable=0.
arc4random(3) obtains a pointer to the root seed version published by the kernel in the shared page at allocation time. Like arc4random(9), it maintains its own per-process copy of the seed version corresponding to the root seed version at the time it last rekeyed. On read requests, the process seed version is compared with the version published in the shared page; if they do not match, arc4random(3) reseeds from the kernel before providing generated output.
This change does not implement the FenestrasX concept of PCPU userspace generators seeded from a per-process base generator. That change is left for future discussion/work.
Reviewed by: kib (previous version) Approved by: csprng (me -- only touching FXRNG here) Differential Revision: https://reviews.freebsd.org/D22839
show more ...
|
#
70890254 |
| 17-Sep-2020 |
Edward Tomasz Napierala <trasz@FreeBSD.org> |
Get rid of sv_errtbl and SV_ABI_ERRNO().
Reviewed by: kib Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D26388
|
Revision tags: release/11.4.0 |
|
#
59838c1a |
| 01-Apr-2020 |
John Baldwin <jhb@FreeBSD.org> |
Retire procfs-based process debugging.
Modern debuggers and process tracers use ptrace() rather than procfs for debugging. ptrace() has a supserset of functionality available via procfs and new deb
Retire procfs-based process debugging.
Modern debuggers and process tracers use ptrace() rather than procfs for debugging. ptrace() has a supserset of functionality available via procfs and new debugging features are only added to ptrace(). While the two debugging services share some fields in struct proc, they each use dedicated fields and separate code. This results in extra complexity to support a feature that hasn't been enabled in the default install for several years.
PR: 244939 (exp-run) Reviewed by: kib, mjg (earlier version) Relnotes: yes Differential Revision: https://reviews.freebsd.org/D23837
show more ...
|
#
75dfc66c |
| 27-Feb-2020 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r358269 through r358399.
|
#
7029da5c |
| 26-Feb-2020 |
Pawel Biernacki <kaktus@FreeBSD.org> |
Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many)
r357614 added CTLFLAG_NEEDGIANT to make it easier to find nodes that are still not MPSAFE (or already are but aren’t properly mark
Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many)
r357614 added CTLFLAG_NEEDGIANT to make it easier to find nodes that are still not MPSAFE (or already are but aren’t properly marked). Use it in preparation for a general review of all nodes.
This is non-functional change that adds annotations to SYSCTL_NODE and SYSCTL_PROC nodes using one of the soon-to-be-required flags.
Mark all obvious cases as MPSAFE. All entries that haven't been marked as MPSAFE before are by default marked as NEEDGIANT
Approved by: kib (mentor, blanket) Commented by: kib, gallatin, melifaro Differential Revision: https://reviews.freebsd.org/D23718
show more ...
|
#
e3532331 |
| 15-Nov-2019 |
John Baldwin <jhb@FreeBSD.org> |
Add a sv_copyout_auxargs() hook in sysentvec.
Change the FreeBSD ELF ABIs to use this new hook to copyout ELF auxv instead of doing it in the sv_fixup hook. In particular, this new hook allows the
Add a sv_copyout_auxargs() hook in sysentvec.
Change the FreeBSD ELF ABIs to use this new hook to copyout ELF auxv instead of doing it in the sv_fixup hook. In particular, this new hook allows the stack space to be allocated at the same time the auxv values are copied out to userland. This allows us to avoid wasting space for unused auxv entries as well as not having to recalculate where the auxv vector is by walking back up over the argv and environment vectors.
Reviewed by: brooks, emaste Tested on: amd64 (amd64 and i386 binaries), i386, mips, mips64 Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D22355
show more ...
|
Revision tags: release/12.1.0 |
|
#
fc83c5a7 |
| 31-Jul-2019 |
Konstantin Belousov <kib@FreeBSD.org> |
Make randomized stack gap between strings and pointers to argv/envs.
This effectively makes the stack base on the csu _start entry randomized.
The gap is enabled if ASLR is for the ABI is enabled,
Make randomized stack gap between strings and pointers to argv/envs.
This effectively makes the stack base on the csu _start entry randomized.
The gap is enabled if ASLR is for the ABI is enabled, and then kern.elf{64,32}.aslr.stack_gap specify the max percentage of the initial stack size that can be wasted for gap. Setting it to zero disables the gap, and max is capped at 50%.
Only amd64 for now.
Reviewed by: cem, markj Discussed with: emaste MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D21081
show more ...
|
Revision tags: release/11.3.0 |
|
#
2aaf9152 |
| 18-Mar-2019 |
Alan Somers <asomers@FreeBSD.org> |
MFHead@r345275
|
#
b18a4cca |
| 05-Mar-2019 |
Enji Cooper <ngie@FreeBSD.org> |
MFhead@r344786
|