tangled
alpha
login
or
join now
jcs.org
/
openbsd-src
0
fork
atom
jcs's openbsd hax
openbsd
0
fork
atom
overview
issues
pulls
pipelines
openbsd-src
/
lib
/
csu
/
at
trash-bin2
13 folders
9 files
aarch64
replace ad-hoc illegal instruction with the architecturally defined one ("permanently undefined") ok deraadt@ kettenis@
5 years ago
alpha
crt0 MD _dl_exit() performs syscall to SYS_exit directly, but then some of these functions were returning. That makes the +1word address a fairly strong and easily located gadget. Put a hard-trap instruction after the syscall. This remains a gadget for 'terminal system' calls (such as execve), but hey that's why we have pledge w/o "exec" throughout the tree. Quite surprisingly, hppa's delay-slot load of SYS_exit makes it the safest of the bunch, not that this helps anyone. ok kettenis
5 years ago
amd64
crt0 MD _dl_exit() performs syscall to SYS_exit directly, but then some of these functions were returning. That makes the +1word address a fairly strong and easily located gadget. Put a hard-trap instruction after the syscall. This remains a gadget for 'terminal system' calls (such as execve), but hey that's why we have pledge w/o "exec" throughout the tree. Quite surprisingly, hppa's delay-slot load of SYS_exit makes it the safest of the bunch, not that this helps anyone. ok kettenis
5 years ago
arm
replace ad-hoc illegal instruction with the architecturally defined one ("permanently undefined") ok deraadt@ kettenis@
5 years ago
hppa
Inline RELOC_* into boot_md.c and simplify the code based on what we can verify at build time. Track dt_pltgot as an Elf_Addr instead of an Elf_Addr* to eliminat casts on both setting and using. Set RELATIVE_RELOC so the ld.so Makefile can verify that it has just the relocation types we expect.
4 years ago
i386
crt0 MD _dl_exit() performs syscall to SYS_exit directly, but then some of these functions were returning. That makes the +1word address a fairly strong and easily located gadget. Put a hard-trap instruction after the syscall. This remains a gadget for 'terminal system' calls (such as execve), but hey that's why we have pledge w/o "exec" throughout the tree. Quite surprisingly, hppa's delay-slot load of SYS_exit makes it the safest of the bunch, not that this helps anyone. ok kettenis
5 years ago
m88k
crt0 MD _dl_exit() performs syscall to SYS_exit directly, but then some of these functions were returning. That makes the +1word address a fairly strong and easily located gadget. Put a hard-trap instruction after the syscall. This remains a gadget for 'terminal system' calls (such as execve), but hey that's why we have pledge w/o "exec" throughout the tree. Quite surprisingly, hppa's delay-slot load of SYS_exit makes it the safest of the bunch, not that this helps anyone. ok kettenis
5 years ago
mips64
Lift the '#ifdef RCRT0' conditional out of boot*.h to crt0.c
4 years ago
powerpc
crt0 MD _dl_exit() performs syscall to SYS_exit directly, but then some of these functions were returning. That makes the +1word address a fairly strong and easily located gadget. Put a hard-trap instruction after the syscall. This remains a gadget for 'terminal system' calls (such as execve), but hey that's why we have pledge w/o "exec" throughout the tree. Quite surprisingly, hppa's delay-slot load of SYS_exit makes it the safest of the bunch, not that this helps anyone. ok kettenis
5 years ago
powerpc64
crt0 MD _dl_exit() performs syscall to SYS_exit directly, but then some of these functions were returning. That makes the +1word address a fairly strong and easily located gadget. Put a hard-trap instruction after the syscall. This remains a gadget for 'terminal system' calls (such as execve), but hey that's why we have pledge w/o "exec" throughout the tree. Quite surprisingly, hppa's delay-slot load of SYS_exit makes it the safest of the bunch, not that this helps anyone. ok kettenis
5 years ago
riscv64
Delete unused non-PIC code.
4 years ago
sh
crt0 MD _dl_exit() performs syscall to SYS_exit directly, but then some of these functions were returning. That makes the +1word address a fairly strong and easily located gadget. Put a hard-trap instruction after the syscall. This remains a gadget for 'terminal system' calls (such as execve), but hey that's why we have pledge w/o "exec" throughout the tree. Quite surprisingly, hppa's delay-slot load of SYS_exit makes it the safest of the bunch, not that this helps anyone. ok kettenis
5 years ago
sparc64
crt0 MD _dl_exit() performs syscall to SYS_exit directly, but then some of these functions were returning. That makes the +1word address a fairly strong and easily located gadget. Put a hard-trap instruction after the syscall. This remains a gadget for 'terminal system' calls (such as execve), but hey that's why we have pledge w/o "exec" throughout the tree. Quite surprisingly, hppa's delay-slot load of SYS_exit makes it the safest of the bunch, not that this helps anyone. ok kettenis
5 years ago
Makefile
Split out the hppa and mips64 versions of boot.h similar to how I split ld.so/boot.c in 2019: * delete extraneous #includes * delete jmprel handling on non-hppa * delete RELOC_GOT() and DT_PROC bits on non-mips64
4 years ago
boot.h
Lift the '#ifdef RCRT0' conditional out of boot*.h to crt0.c
4 years ago
crt0.c
Lift the '#ifdef RCRT0' conditional out of boot*.h to crt0.c
4 years ago
crtbegin.c
Use static consistently with definitions of functions that have been declared static.
7 years ago
crtbeginS.c
Declare pthread_atfork as weak to avoid a fatal error with LLVM 13
4 years ago
crtend.c
Declare the symbols that label the .ctors, .dtors, .eh_frame, and .jcr sections as extern hidden arrays of indefinite size, so that the compiler (well, clang) doesn't believe it knows the exact contents and thus optimize things into infinite loops. Actually set the symbols to be in the sections and insert the leading and trailing values via __asm().
9 years ago
crtendS.c
Declare the symbols that label the .ctors, .dtors, .eh_frame, and .jcr sections as extern hidden arrays of indefinite size, so that the compiler (well, clang) doesn't believe it knows the exact contents and thus optimize things into infinite loops. Actually set the symbols to be in the sections and insert the leading and trailing values via __asm().
9 years ago
extern.h
ld.so boot cleanup support: - put functions and data which are only used before calling the executable's start function into their own page-aligned segments for unmapping (only done on amd64, arm64, armv7, powerpc, and sparc64 so far) - pass .init_array and .preinit_array functions an addition argument which is a callback to get a structure which includes a function that frees the boot text and data - sometimes delay doing RELRO processing: for a shared-object marked DF_1_INITFIRST do it after the object's .init_array, for the executable do it after the .preinit_array - improve test-ld.so to link against libpthread and trigger its initialization late libc changes to use this will come later
7 years ago
os-note-elf.h
Work-around a gcc3 -g bug causing debug ld.so to crash. okay kettenis@ drahn@
17 years ago