#
1e99be5d |
| 08-Dec-2024 |
Maxim Sobolev <sobomax@FreeBSD.org> |
libc: lib_malloc_aligned(): add a missing NULL check
For some reason return value of the __je_bootstrap_malloc() is not checked and then de-referenced few lines below, causing a SEGV if an early all
libc: lib_malloc_aligned(): add a missing NULL check
For some reason return value of the __je_bootstrap_malloc() is not checked and then de-referenced few lines below, causing a SEGV if an early allocation fails.
MFC after: 1 month
show more ...
|
Revision tags: release/14.2.0, release/13.4.0, release/14.1.0, release/13.3.0, release/14.0.0 |
|
#
559a218c |
| 01-Nov-2023 |
Warner Losh <imp@FreeBSD.org> |
libc: Purge unneeded cdefs.h
These sys/cdefs.h are not needed. Purge them. They are mostly left-over from the $FreeBSD$ removal. A few in libc are still required for macros that cdefs.h defines. Kee
libc: Purge unneeded cdefs.h
These sys/cdefs.h are not needed. Purge them. They are mostly left-over from the $FreeBSD$ removal. A few in libc are still required for macros that cdefs.h defines. Keep those.
Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D42385
show more ...
|
#
b3e76948 |
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
Remove $FreeBSD$: two-line .h pattern
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
|
#
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 |
|
#
0c6f0c0d |
| 06-Nov-2022 |
Konstantin Belousov <kib@FreeBSD.org> |
libc: move declaration of 'char **environ' to common private header
Suggested by: imp Reviewed by: markj Tested by: markj (aarch64) Sponsored by: The FreeBSD Foundation MFC after: 3 weeks Differenti
libc: move declaration of 'char **environ' to common private header
Suggested by: imp Reviewed by: markj Tested by: markj (aarch64) Sponsored by: The FreeBSD Foundation MFC after: 3 weeks Differential revision: https://reviews.freebsd.org/D37220
show more ...
|
Revision tags: release/13.1.0 |
|
#
479ef15d |
| 10-Jan-2022 |
Warner Losh <imp@FreeBSD.org> |
libc: Teak comment about mips
Remove mips from the list of machines using TLS variant I and reformat paragraph. No functional change intended.
Sponsored by: Netflix
|
#
8bcdb144 |
| 09-Dec-2021 |
John Baldwin <jhb@FreeBSD.org> |
TLS: Use <machine/tls.h> for libc and rtld.
- Include <machine/tls.h> in MD rtld_machdep.h headers.
- Remove local definitions of TLS_* constants from rtld_machdep.h headers and libc using the va
TLS: Use <machine/tls.h> for libc and rtld.
- Include <machine/tls.h> in MD rtld_machdep.h headers.
- Remove local definitions of TLS_* constants from rtld_machdep.h headers and libc using the values from <machine/tls.h> instead.
- Use _tcb_set() instead of inlined versions in MD allocate_initial_tls() routines in rtld. The one exception is amd64 whose _tcb_set() invokes the amd64_set_fsbase ifunc. rtld cannot use ifuncs, so amd64 inlines the logic to optionally write to fsbase directly.
- Use _tcb_set() instead of _set_tp() in libc.
- Use '&_tcb_get()->tcb_dtv' instead of _get_tp() in both rtld and libc. This permits removing _get_tp.c from rtld.
- Use TLS_TCB_SIZE and TLS_TCB_ALIGN with allocate_tls() in MD allocate_initial_tls() routines in rtld.
Reviewed by: kib, jrtc27 (earlier version) Differential Revision: https://reviews.freebsd.org/D33353
show more ...
|
#
4c2f5bfb |
| 09-Dec-2021 |
John Baldwin <jhb@FreeBSD.org> |
libc: Fix the alignment of the TCB to match rtld for several architectures.
- Use 16 byte alignment rather than 8 for aarch64, powerpc64, and RISC-V.
- Use 8 byte alignment rather than 4 for 32-bit
libc: Fix the alignment of the TCB to match rtld for several architectures.
- Use 16 byte alignment rather than 8 for aarch64, powerpc64, and RISC-V.
- Use 8 byte alignment rather than 4 for 32-bit arm, mips, and powerpc.
I suspect that mips64 should be using 16 byte alignment, but both libc and rtld currently use 8 byte alignment.
Reviewed by: kib, jrtc27 Sponsored by: The University of Cambridge, Google Inc. Differential Revision: https://reviews.freebsd.org/D33350
show more ...
|
Revision tags: release/12.3.0 |
|
#
300e0893 |
| 15-Aug-2021 |
Konstantin Belousov <kib@FreeBSD.org> |
libc tls: use TLS_DTV_OFFSET defined by rtld.h
Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D31541
|
#
8f63fa78 |
| 14-Aug-2021 |
Fangrui Song <i@maskray.me> |
rtld: Remove calculate_tls_end
Variant I architectures use off and Variant II ones use size + off. Define TLS_VARIANT_I/TLS_VARIANT_II symbols similarly to how libc handles it.
Reviewed by: kib MFC
rtld: Remove calculate_tls_end
Variant I architectures use off and Variant II ones use size + off. Define TLS_VARIANT_I/TLS_VARIANT_II symbols similarly to how libc handles it.
Reviewed by: kib MFC after: 1 week Differential revision: https://reviews.freebsd.org/D31539 Differential revision: https://reviews.freebsd.org/D31541
show more ...
|
#
a1581cd7 |
| 14-Aug-2021 |
Gordon Bergling <gbe@FreeBSD.org> |
Fix a common typo in source code comments
- s/aligment/alignment/
MFC after: 5 days
|
Revision tags: release/13.0.0 |
|
#
ca46b569 |
| 05-Apr-2021 |
Konstantin Belousov <kib@FreeBSD.org> |
libc: implement __tls_get_addr() for static binaries
Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D29623
|
#
7f7489eb |
| 05-Apr-2021 |
Konstantin Belousov <kib@FreeBSD.org> |
libc: include rtld.h into static implementations of rtld interface
and resolve naming conficts
Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.
libc: include rtld.h into static implementations of rtld interface
and resolve naming conficts
Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D29623
show more ...
|
Revision tags: release/12.2.0, release/11.4.0 |
|
#
75dfc66c |
| 27-Feb-2020 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r358269 through r358399.
|
#
a5b6c296 |
| 26-Feb-2020 |
Warner Losh <imp@FreeBSD.org> |
Remove sparc64 specific parts of libc.
Also update comments for which architectures use 128 bit long doubles, as appropriate.
The softfloat specialization routines weren't updated since they appear
Remove sparc64 specific parts of libc.
Also update comments for which architectures use 128 bit long doubles, as appropriate.
The softfloat specialization routines weren't updated since they appear to be from an upstream source which we may want to update in the future to get a more favorable license.
Reviewed by: emaste@ Differential Revision: https://reviews.freebsd.org/D23658
show more ...
|
Revision tags: release/12.1.0, release/11.3.0, release/12.0.0, release/11.2.0 |
|
#
6e16d0bc |
| 12-Dec-2017 |
Michal Meloun <mmel@FreeBSD.org> |
Rework alignment handling in __libc_allocate_tls() for Variant I of TLS layout.
There are two versions of variant I of TLS - ARM and aarch64 uses original version of variant I here TP points to st
Rework alignment handling in __libc_allocate_tls() for Variant I of TLS layout.
There are two versions of variant I of TLS - ARM and aarch64 uses original version of variant I here TP points to start of TCB followed by aligned TLS segment. Both TCB and TLS must be aligned to alignment of TLS section. The TCB[0] points to DTV vector and DTV values are real addresses (without bias).
- MIPS, PowerPC and RISC-V use modified version of variant I, where TP points (with bias) to TLS and TCB immediately precedes TLS without any alignment gap. Only TLS should be aligned. The TCB[0] points to DTV vector and DTV values are biased by constant value (0x8000) from real addresses.
Take all this in account when allocating memory for TLS structures.
MFC after: 1 month Reviewed by: kib, mizhka Tested by: mizhka(on mips) Differential Revision: https://reviews.freebsd.org/D13378
show more ...
|
#
d915a14e |
| 25-Nov-2017 |
Pedro F. Giffuni <pfg@FreeBSD.org> |
libc: further adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 2-Clause license, however the tool I was using mis-identified many licenses so this was mostly a manual - error p
libc: further adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 2-Clause license, however the tool I was using mis-identified many licenses so this was mostly a manual - error prone - task.
The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts.
show more ...
|
#
c2c014f2 |
| 07-Nov-2017 |
Hans Petter Selasky <hselasky@FreeBSD.org> |
Merge ^/head r323559 through r325504.
|
#
f6e116ee |
| 04-Nov-2017 |
Enji Cooper <ngie@FreeBSD.org> |
MFhead@r325383
|
#
8584ed54 |
| 03-Nov-2017 |
Michal Meloun <mmel@FreeBSD.org> |
Add alignment support to __libc_allocate_tls().
For statically linked binaries, where all relocation are solved by static linker, the linker expect that offset to TLS section is aligned. Additionaly
Add alignment support to __libc_allocate_tls().
For statically linked binaries, where all relocation are solved by static linker, the linker expect that offset to TLS section is aligned. Additionaly, to maintain absolute alignment, TLS TCB should by also aligned.
Obtained from: CheriBSD (initial version) MFC after: 1 month Reviewed by: brooks (previous version), kib Differential Revision: https://reviews.freebsd.org/D12907
show more ...
|
#
50896984 |
| 10-Oct-2017 |
Enji Cooper <ngie@FreeBSD.org> |
MFhead@r324482
|
#
5e122251 |
| 04-Oct-2017 |
Brooks Davis <brooks@FreeBSD.org> |
Remove an unneeded and incorrect memset().
On Variant I TLS architectures (aarch64, arm, mips, powerpc, and riscv) the __libc_allocate_tls function allocates thread local storage memory with calloc(
Remove an unneeded and incorrect memset().
On Variant I TLS architectures (aarch64, arm, mips, powerpc, and riscv) the __libc_allocate_tls function allocates thread local storage memory with calloc(). It then copies initialization data over the portions with non-zero initial values. Before this change it would then pointlessly zero the already zeroed remainder of the storage. Unfortunately the calculation was wrong and it would zero TLS_TCB_SIZE (2*sizeof(void *)) additional bytes.
In practice, this overflow only matters if the TLS segment is sized such that calloc() allocates a less than TLS_TCB_SIZE extra memory. Even then, the likely result will be zeroing part of the next bucket. This coupled with the impact being confined to Tier II platforms means there will be no security advisory for this issue.
Reviewed by: kib, dfr Discussed with: security-officer (delphij) MFC after: 1 week Found by: CHERI Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D12547
show more ...
|
Revision tags: release/10.4.0 |
|
#
083c8ded |
| 13-Aug-2017 |
Enji Cooper <ngie@FreeBSD.org> |
MFhead@r322451
|
#
0275f9db |
| 11-Aug-2017 |
Hans Petter Selasky <hselasky@FreeBSD.org> |
Merge ^/head r321383 through r322397.
|
#
ca20f8ec |
| 07-Aug-2017 |
Ruslan Bukin <br@FreeBSD.org> |
o Replace __riscv__ with __riscv o Replace __riscv64 with (__riscv && __riscv_xlen == 64)
This is required to support new GCC 7.1 compiler. This is compatible with current GCC 6.1 compiler.
RISC-V
o Replace __riscv__ with __riscv o Replace __riscv64 with (__riscv && __riscv_xlen == 64)
This is required to support new GCC 7.1 compiler. This is compatible with current GCC 6.1 compiler.
RISC-V is extensible ISA and the idea here is to have built-in define per each extension, so together with __riscv we will have some subset of these as well (depending on -march string passed to compiler):
__riscv_compressed __riscv_atomic __riscv_mul __riscv_div __riscv_muldiv __riscv_fdiv __riscv_fsqrt __riscv_float_abi_soft __riscv_float_abi_single __riscv_float_abi_double __riscv_cmodel_medlow __riscv_cmodel_medany __riscv_cmodel_pic __riscv_xlen
Reviewed by: ngie Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D11901
show more ...
|