#
986c96b5 |
| 18-Jan-2025 |
Konstantin Belousov <kib@FreeBSD.org> |
rtld-elf/map_object.c: apply clang-format
Discussed with: emaste, imp Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D48509
|
#
fda0403e |
| 06-Dec-2024 |
John Baldwin <jhb@FreeBSD.org> |
rtld: Support multiple PT_GNU_RELRO program headers
Iterate over all the program headers in obj_remap_relro and remove the relro fields from Obj_Entry.
Skip the call to obj_enforce_relro() in reloc
rtld: Support multiple PT_GNU_RELRO program headers
Iterate over all the program headers in obj_remap_relro and remove the relro fields from Obj_Entry.
Skip the call to obj_enforce_relro() in relocate_object() for the rtld object as well as the main program object. obj_enforce_relro() is called later when it safe to reference globals such as page_size.
Reviewed by: kib Obtained from: CheriBSD Sponsored by: AFRL, DARPA Differential Revision: https://reviews.freebsd.org/D47884
show more ...
|
Revision tags: release/14.2.0, release/13.4.0, release/14.1.0, release/13.3.0, release/14.0.0 |
|
#
b3e76948 |
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
Remove $FreeBSD$: two-line .h pattern
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
|
#
283a4f40 |
| 05-Jun-2023 |
Konstantin Belousov <kib@FreeBSD.org> |
rtld: rename tls_done to tls_static
The meaning of the flag is that static TLS allocation was done.
Taken from NetBSD Joerg Sonnenberger change for src/libexec/ld.elf_so/tls.c rev. 1.18.
Sponsored
rtld: rename tls_done to tls_static
The meaning of the flag is that static TLS allocation was done.
Taken from NetBSD Joerg Sonnenberger change for src/libexec/ld.elf_so/tls.c rev. 1.18.
Sponsored by: The FreeBSD Foundation MFC after: 1 week
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 |
|
#
5942b4b6 |
| 14-Feb-2023 |
Konstantin Belousov <kib@FreeBSD.org> |
sys/param.h: Add _WANT_P_OSREL
Use it instead of defining IN_RTLD by base sources that want P_OSREL_ defines in userspace, but are not rtld. This allows to remove abuse of IN_RTLD from userspace.
R
sys/param.h: Add _WANT_P_OSREL
Use it instead of defining IN_RTLD by base sources that want P_OSREL_ defines in userspace, but are not rtld. This allows to remove abuse of IN_RTLD from userspace.
Reviewed by: dchagin, markj, imp Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D38585
show more ...
|
#
b069d3e0 |
| 04-Jan-2023 |
John Baldwin <jhb@FreeBSD.org> |
rtld: Revert "When loading dso without PT_GNU_STACK phdr, only call"
After the removal of ia64 and sparc64, all current architectures support executable stacks at an architectural level.
This rever
rtld: Revert "When loading dso without PT_GNU_STACK phdr, only call"
After the removal of ia64 and sparc64, all current architectures support executable stacks at an architectural level.
This reverts commit 1290d38ac50b3afa7e5781d9d97346a1042c736c.
Reviewed by: kib Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D37904
show more ...
|
Revision tags: release/12.4.0, release/13.1.0 |
|
#
e85eaa93 |
| 04-Apr-2022 |
Andrew Turner <andrew@FreeBSD.org> |
Have rtld query the page size from the kernel
To allow for a dynamic page size on arm64 have the runtime linker query the kernel for the currentl page size.
Reviewed by: kib Sponsored by: The FreeB
Have rtld query the page size from the kernel
To allow for a dynamic page size on arm64 have the runtime linker query the kernel for the currentl page size.
Reviewed by: kib Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D34765
show more ...
|
Revision tags: release/12.3.0 |
|
#
63fc4e82 |
| 11-Nov-2021 |
Konstantin Belousov <kib@FreeBSD.org> |
rtld: extract header validation into new helper check_elf_headers()
Reviewed by: emaste Discussed with: jrtc27 Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revi
rtld: extract header validation into new helper check_elf_headers()
Reviewed by: emaste Discussed with: jrtc27 Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D32960
show more ...
|
#
c9f833ab |
| 12-Aug-2021 |
Konstantin Belousov <kib@FreeBSD.org> |
rtld: Round down relro_size
lld rounds up p_memsz(PT_GNU_RELRO) to satisfy common-page-size. If the page size is smaller than common-page-size, rounding up relro_size may incorrectly make some RW pa
rtld: Round down relro_size
lld rounds up p_memsz(PT_GNU_RELRO) to satisfy common-page-size. If the page size is smaller than common-page-size, rounding up relro_size may incorrectly make some RW pages read-only.
GNU ld, gold, and ld.lld ensures p_vaddr+p_memsz is a multiple of common-page-size. While max-page-size >= system the page size, common-page-size can be smaller than the system page size.
Submitted by: MaskRay MFC after: 1 week Differential revision: https://reviews.freebsd.org/D31498
show more ...
|
Revision tags: release/13.0.0, release/12.2.0 |
|
#
12cb97fb |
| 06-Sep-2020 |
Konstantin Belousov <kib@FreeBSD.org> |
Undo 'fix off by one' part of r365360.
Noted by: emaste Sponsored by: The FreeBSD Foundation MFC after: 6 days
|
#
5d6d106c |
| 05-Sep-2020 |
Konstantin Belousov <kib@FreeBSD.org> |
rtld: Handle ELF dso with program headers outside the first page.
Reported by: Alex Arslan <alex.arslan@julialang.org> PR: 229708 Reviewed by: dim (previous version), emaste Sponsored by: The FreeBS
rtld: Handle ELF dso with program headers outside the first page.
Reported by: Alex Arslan <alex.arslan@julialang.org> PR: 229708 Reviewed by: dim (previous version), emaste Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D26323
show more ...
|
Revision tags: release/11.4.0 |
|
#
2f06c66a |
| 05-Apr-2020 |
Konstantin Belousov <kib@FreeBSD.org> |
Make p_vaddr % p_align == p_offset % p_align for (some) TLS segments.
See https://sourceware.org/bugzilla/show_bug.cgi?id=24606 for the test case. See https://reviews.llvm.org/D64930 for the backgro
Make p_vaddr % p_align == p_offset % p_align for (some) TLS segments.
See https://sourceware.org/bugzilla/show_bug.cgi?id=24606 for the test case. See https://reviews.llvm.org/D64930 for the background and more discussion.
Also this fixes another bug in malloc_aligned() where total size of the allocated memory might be not enough to fit the aligned requested block after the initial pointer is incremented by the pointer size.
Reviewed by: bdragon Tested by: antoine (exp-run PR 244866), bdragon, emaste Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Differential revision: https://reviews.freebsd.org/D21163
show more ...
|
#
f5392eb6 |
| 12-Dec-2019 |
Konstantin Belousov <kib@FreeBSD.org> |
rtld: make checks for mmap(2) failures compliant with documentation.
On error, mmap(2) returns MAP_FAILED. There is no need to use its definition or to cast.
Sponsored by: The FreeBSD Foundation M
rtld: make checks for mmap(2) failures compliant with documentation.
On error, mmap(2) returns MAP_FAILED. There is no need to use its definition or to cast.
Sponsored by: The FreeBSD Foundation MFC after: 1 week
show more ...
|
#
44c9aa49 |
| 12-Dec-2019 |
Brandon Bergren <bdragon@FreeBSD.org> |
rtld: do not try to mmap a zero-sized PT_LOAD
When a PT_LOAD segment has a zero p_filesz, skip the data mmap, as mmapping zero bytes from a file is an error.
A PT_LOAD with zero p_filesz is legal (
rtld: do not try to mmap a zero-sized PT_LOAD
When a PT_LOAD segment has a zero p_filesz, skip the data mmap, as mmapping zero bytes from a file is an error.
A PT_LOAD with zero p_filesz is legal (but somewhat uncommon due to segment merging in modern linkers, as it is more efficient to merge .data and .bss by just extending p_memsz in the previous segment, assuming compatible page protection.)
This was seen on ports/graphics/glew on a powerpc64 ELFv2 experimental build.
Submitted by: Alfredo Dal'Ava Junior <alfredo.junior@eldorado.org.br> Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D22634
show more ...
|
Revision tags: release/12.1.0, release/11.3.0, release/12.0.0 |
|
#
2a22df74 |
| 04-Nov-2018 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r339813 through r340125.
|
#
56199114 |
| 04-Nov-2018 |
Konstantin Belousov <kib@FreeBSD.org> |
Remove Obj_Entry textsize member.
It is unused after r340102, and more important, I do not see how to define textsize in both practically useful and correct way, for binaries with more that one exec
Remove Obj_Entry textsize member.
It is unused after r340102, and more important, I do not see how to define textsize in both practically useful and correct way, for binaries with more that one executable segments.
Sponsored by: The FreeBSD Foundation
show more ...
|
#
3ab5b6bd |
| 29-Oct-2018 |
Alex Richardson <arichardson@FreeBSD.org> |
rtld-elf: fix more warnings to allow compiling with WARNS=6
Reviewed By: kib Approved By: brooks (mentor) Differential Revision: https://reviews.freebsd.org/D17154
|
#
903e0ffd |
| 29-Oct-2018 |
Alex Richardson <arichardson@FreeBSD.org> |
rtld-elf: compile with WANRS=4 warnings other than -Wcast-align
Reviewed By: kib Approved By: brooks (mentor) Differential Revision: https://reviews.freebsd.org/D17153
|
#
78b64846 |
| 29-Oct-2018 |
Alex Richardson <arichardson@FreeBSD.org> |
rtld-elf: make it compile with WARNS=3
Reviewed By: kib Approved By: brooks (mentor) Differential Revision: https://reviews.freebsd.org/D17150
|
#
ca7e27bb |
| 29-Oct-2018 |
Alex Richardson <arichardson@FreeBSD.org> |
rtld: set obj->textsize correctly
With lld-generated binaries the first PT_LOAD will usually be a read-only segment unless you pass --no-rosegment. For those binaries the textsize is determined by t
rtld: set obj->textsize correctly
With lld-generated binaries the first PT_LOAD will usually be a read-only segment unless you pass --no-rosegment. For those binaries the textsize is determined by the next PT_LOAD. To allow both LLD and bfd 2.17 binaries to be parsed correctly use the end of the last PT_LOAD that is marked as executable instead.
I noticed that the value was wrong while adding some debug prints for some rtld changes for CHERI binaries. `obj->textsize` only seems to be used by PPC so the effect is untested. However, the value before was definitely wrong and the new result matches the phdrs.
Reviewed By: kib Approved By: brooks (mentor) Differential Revision: https://reviews.freebsd.org/D17117
show more ...
|
Revision tags: release/11.2.0 |
|
#
e6209940 |
| 27-Nov-2017 |
Pedro F. Giffuni <pfg@FreeBSD.org> |
libexec: adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 2-Clause license, however the tool I was using misidentified many licenses so this was mostly a manual - error prone -
libexec: adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 2-Clause license, however the tool I was using misidentified 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.
No functional change intended.
show more ...
|
Revision tags: release/10.4.0 |
|
#
531c2d7a |
| 24-Jul-2017 |
Enji Cooper <ngie@FreeBSD.org> |
MFhead@r320180
|
#
bca9d05f |
| 23-Jul-2017 |
Hans Petter Selasky <hselasky@FreeBSD.org> |
Merge ^/head r319973 through 321382.
|
Revision tags: release/11.1.0 |
|
#
a3604b95 |
| 27-Jun-2017 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r320042 through r320397.
|