Up to [local] / src / libexec / ld.so
Request diff between arbitrary revisions
Default branch: MAIN
Revision 1.8 / (download) - annotate - [select for diffs], Fri Apr 5 13:51:47 2024 UTC (2 months ago) by deraadt
Branch: MAIN
CVS Tags: HEAD
Changes since 1.7: +1 -2 lines
Diff to previous 1.7 (colored)
ld.so should stop calling msyscall(2), since it is fully neutered and about to be removed. Please be careful building through this, you need a kernel at least March 29th or so to build through it, otherwise use snapshots to cross over. ok various people
Revision 1.7 / (download) - annotate - [select for diffs], Fri Jan 19 14:16:42 2024 UTC (4 months, 2 weeks ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE,
OPENBSD_7_5
Changes since 1.6: +1 -2 lines
Diff to previous 1.6 (colored)
Stop initializing pinsyscall(SYS_execve in dynamic binaries that contain a reference reaching the execve(2) stub. The new pinsyscalls(2) that applies to all system calls has made this redundant.
Revision 1.6 / (download) - annotate - [select for diffs], Wed Dec 20 14:54:29 2023 UTC (5 months, 2 weeks ago) by deraadt
Branch: MAIN
Changes since 1.5: +2 -1 lines
Diff to previous 1.5 (colored)
create a stub for pinsyscalls(2)
Revision 1.5 / (download) - annotate - [select for diffs], Tue Dec 12 17:39:14 2023 UTC (5 months, 3 weeks ago) by deraadt
Branch: MAIN
Changes since 1.4: +2 -2 lines
Diff to previous 1.4 (colored)
repair type for 2nd arg of read(2)
Revision 1.4 / (download) - annotate - [select for diffs], Sat Feb 18 01:22:50 2023 UTC (15 months, 2 weeks ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_7_4_BASE,
OPENBSD_7_4,
OPENBSD_7_3_BASE,
OPENBSD_7_3
Changes since 1.3: +2 -1 lines
Diff to previous 1.3 (colored)
Lookup the start,len of the "execve" stub in libc.so, and tell the kernel where it is with pinsyscall(). In non-static binaries, kernel execve(2) will now insist upon being called from that small region. Arriving from a different region smells like ROP methodology, and the process is killed.
Revision 1.3 / (download) - annotate - [select for diffs], Sat Nov 5 18:44:09 2022 UTC (19 months ago) by deraadt
Branch: MAIN
Changes since 1.2: +2 -1 lines
Diff to previous 1.2 (colored)
teach ld.so how to call the mimmutable() system call ok kettenis
Revision 1.2 / (download) - annotate - [select for diffs], Sat Jan 8 06:49:41 2022 UTC (2 years, 5 months ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_7_2_BASE,
OPENBSD_7_2,
OPENBSD_7_1_BASE,
OPENBSD_7_1
Changes since 1.1: +2 -4 lines
Diff to previous 1.1 (colored)
Prep .c files for removing the #includes from */archdep.h * replace #include "archdep.h" with #includes of what is used, pulling in "syscall.h", "util.h", and "archdep.h" as needed * delete #include <sys/syscall.h> from syscall.h * only pull in <sys/stat.h> to the three files that use _dl_fstat(), forward declare struct stat in syscall.h for the others * NBBY is for <sys/select.h> macros; just use '8' in dl_printf.c * <machine/vmparam.h> is only needed on i386; conditionalize it * stop using __LDPGSZ: use _MAX_PAGE_SHIFT (already used by malloc.c) where necessary * delete other bogus #includes, order legit per style: <sys/*> then <*/*>, then <*>, then "*" dir.c improvement from jsg@ ok and testing assistance deraadt@
Revision 1.1 / (download) - annotate - [select for diffs], Thu Dec 23 18:50:32 2021 UTC (2 years, 5 months ago) by guenther
Branch: MAIN
Roll the syscalls that have an off_t argument to remove the explicit padding. Switch libc and ld.so to the generic stubs for these calls. WARNING: reboot to updated kernel before installing libc or ld.so! Time for a story... When gcc (back in 1.x days) first implemented long long, it didn't (always) pass 64bit arguments in 'aligned' registers/stack slots, with the result that argument offsets didn't match structure offsets. This affected the nine system calls that pass off_t arguments: ftruncate lseek mmap mquery pread preadv pwrite pwritev truncate To avoid having to do custom ASM wrappers for those, BSD put an explicit pad argument in so that the off_t argument would always start on a even slot and thus be naturally aligned. Thus those odd wrappers in lib/libc/sys/ that use __syscall() and pass an extra '0' argument. The ABIs for different CPUs eventually settled how things should be passed on each and gcc 2.x followed them. The only arch now where it helps is landisk, which needs to skip the last argument register if it would be the first half of a 64bit argument. So: add new syscalls without the pad argument and on landisk do that skipping directly in the syscall handler in the kernel. Keep compat support for the existing syscalls long enough for the transition. ok deraadt@