memmove() entry point is declared with NENTRY() and isn't consecutivewith an ENTRY(), so it needs its own endbr64 for IBTok deraadt@
spelling
Don't use *ENTRY_NB() with END_BUILTIN(), at least yetProblem noted by naddy@
Add ENTRY_NB() macro for doing an ASM function entry without settingthe binding to global (NB == "no binding"), as clang 13 is nowwarning about changing the binding from global to weak.This first
Add ENTRY_NB() macro for doing an ASM function entry without settingthe binding to global (NB == "no binding"), as clang 13 is nowwarning about changing the binding from global to weak.This first pass does amd64 and sparc64 and pulls DEFS.h out of theper-arch directory to a common directory; others to followok kettenis@
show more ...
In asm.h ensure NENTRY uses the old-school nop-sled align, but change standardENTRY is a trapsled. Fix a few functions which fall-through into an ENTRYmacro. amd64 binaries now are free of double+
In asm.h ensure NENTRY uses the old-school nop-sled align, but change standardENTRY is a trapsled. Fix a few functions which fall-through into an ENTRYmacro. amd64 binaries now are free of double+-nop sequences (except for oneassember nit in aes-586.pl). Previous changes by guenther got us here.ok mortimer kettenis
Add retguard macros for libc.ok deraadt
Instead of trying to handle ffs() with the normal rename-mark-hidden-and-aliasdance, mark it protected. This works better for both gcc and clang: gccblocks overriding of internal calls, while clan
Instead of trying to handle ffs() with the normal rename-mark-hidden-and-aliasdance, mark it protected. This works better for both gcc and clang: gccblocks overriding of internal calls, while clang permits inlining again.ok otto@
clang doesn't propagate attributes like "asm labels" and "visibility(hidden)"to builtins like mem{set,cpy,move} and __stack_smash_handler. So, whenbuilding with clang, instead mark those as protec
clang doesn't propagate attributes like "asm labels" and "visibility(hidden)"to builtins like mem{set,cpy,move} and __stack_smash_handler. So, whenbuilding with clang, instead mark those as protected visibility to get ridof the PLT relocations. We can't take the address of them then, but that'sok: it's a build-time error not a run-time error.ok kettenis@
"the the" -> "the" in comment
Split the non-syscall ASM bits from SYS.h into DEFS.h and use that in thenon-syscall .S sourceok millert@ miod@
Add framework for resolving (pun intended) libc namespace issues, usingwrapper .h files and asm labels to let internal calls resolve directly andnot be overridable or use the PLT. Then, apply that
Add framework for resolving (pun intended) libc namespace issues, usingwrapper .h files and asm labels to let internal calls resolve directly andnot be overridable or use the PLT. Then, apply that framework to most ofthe functions in stdio.h, string.h, err.h, and wchar.h. Delete theshould-have-been-hidden-all-along _v?(err|warn)[cx]? symbols while here.tests clean on i386, amd64, sparc64, powerpc, and mips64naming feedback from kettenis@ and millert@ok kettenis@
Sprinkle END() in some straightforward *.S files that have ENTRY(). Theresulting *.o have "FUNC" symbols with size set.
Make index/rindex weak aliases of strchr/strrchr since they are notpart of the ISO C standard and have also been dropped from POSIX.OK guenther@ kettenis@
Import new amd64 assembly versions of strchr/index, strrchr/rindex,and strlen that provide a significantly faster performance than ourprevious .c or .S implementations. Based on NetBSD's code.Te
Import new amd64 assembly versions of strchr/index, strrchr/rindex,and strlen that provide a significantly faster performance than ourprevious .c or .S implementations. Based on NetBSD's code.Tested with different amd64 CPUs.ok deraadt@ mikeb@
restructure libc/string + libc/arch/*/string coperation regarding(potentially) MD versions (function dependent, not filename dependent)split out memcpy/memmove/bcopy and strchr/index/strrchr/rindex
restructure libc/string + libc/arch/*/string coperation regarding(potentially) MD versions (function dependent, not filename dependent)split out memcpy/memmove/bcopy and strchr/index/strrchr/rindexBring back amd64 .S versionsAnd the final touch: switch all architectures temporarily to MImemcpy.c, which contains syslog + abort for overlapping copies. A niceharsh undefined behaviour. We will clean the entire userland of theremaining issues in this catagory, then switch to the optimised memcpywhich skips the memmove check.I tried to cut this change into pieces, but testing each sub-step onevery architecture is too time consuming and mindnumbing.ok miod
One of these optimized stubs creates some incredibly subtle damage,causing as(1) to create a wrong nop-sled for text segment aligns.Revert, until it is found and fixed.
Add amd64 assembler versions of some standard functions to libc. Thecode is already used in the kernel and the files are unmodified copiesfrom src/sys/lib/libkern/arch/amd64/. Depending on the fu
Add amd64 assembler versions of some standard functions to libc. Thecode is already used in the kernel and the files are unmodified copiesfrom src/sys/lib/libkern/arch/amd64/. Depending on the function, thisgives us some speedup in userland.ok deraadt@, no objections from miod@
remove lint leftovers; ok guenther@
Remove assembly version of strlen from i386 and amd64, where it'sup to 3 times slower than the C code most of the time. This wasbrought up by DragonflyBSD guys initially.ok deraadt, guenther. mi
Remove assembly version of strlen from i386 and amd64, where it'sup to 3 times slower than the C code most of the time. This wasbrought up by DragonflyBSD guys initially.ok deraadt, guenther. miod will not miss it.
Reimplement mutexes, condvars, and rwlocks to eliminate bugs,particularly the "consume the signal you just sent" hang, and puttingthe wait queues in userspace.Do cancellation handling in pthread_
Reimplement mutexes, condvars, and rwlocks to eliminate bugs,particularly the "consume the signal you just sent" hang, and puttingthe wait queues in userspace.Do cancellation handling in pthread_cond_*wait(), pthread_join(),and sem_wait().Add __ prefix to thr{sleep,wakeup,exit,sigdivert}() syscalls; add'abort" argument to thrsleep to close cancellation race; makethr{sleep,wakeup} return errno values via *retval to avoid touchinguserspace errno.
fix some lint 'xxx used, but not defined' warnings by properly addingstuff to LSRCS
things for amd64; from art@