Remove bogus checks against NCARGS.NCARGS isn't a limit on the number of arguments to pass to a function,but the number of bytes that can be consumed by arguments to exec. Assuch, it is not suit
Remove bogus checks against NCARGS.NCARGS isn't a limit on the number of arguments to pass to a function,but the number of bytes that can be consumed by arguments to exec. Assuch, it is not suitable for a limit on the count of arguments passedto makecontext().Sponsored by: DARPA / AFRL
show more ...
libc: further adoption of SPDX licensing ID tags.Mainly focus on files that use BSD 2-Clause license, however the tool Iwas using mis-identified many licenses so this was mostly a manual - errorp
libc: further adoption of SPDX licensing ID tags.Mainly focus on files that use BSD 2-Clause license, however the tool Iwas using mis-identified many licenses so this was mostly a manual - errorprone - task.The Software Package Data Exchange (SPDX) group provides a specificationto make it easier for automated tools to detect and summarize well knownopensource licenses. We are gradually adopting the specification, notingthat the tags are considered only advisory and do not, in any way,superceed or replace the license texts.
libc: make some more use of the nitems() macro.We have an nitems() macro in the <sys/param.h> header that isconvenient to re-use as it makes things easier to read.Given that it is available alrea
libc: make some more use of the nitems() macro.We have an nitems() macro in the <sys/param.h> header that isconvenient to re-use as it makes things easier to read.Given that it is available already without adding additionalheaders and other parts of libc already use it, extend a bitmore its use.
Make unions in PowerPC libc endian-safe.
Add include for declaration of _set_tp(). Eliminates -Wmissing-prototypes warnings.
Save and restore non-volatile floating-point registers during longjmp().This should also save and restore non-volatile Altivec registers, but thatneeds to wait on solving two problems:1. Adding th
Save and restore non-volatile floating-point registers during longjmp().This should also save and restore non-volatile Altivec registers, but thatneeds to wait on solving two problems:1. Adding the nonvolatile vector registers means we need 5 more than _JBLEN entries in jmp_buf on 32-bit targets (64-bit is OK).2. Need to figure out how to determine if saving/restoring vector regs is supported on the current CPU from userland.MFC after: 1 month
Remove duplicate copies of trivial getcontextx.cOnly i386 and amd64 provide a non-trivial __getcontextx(). Use a commontrivial implementation in gen/ for other architectures, rather thancopying t
Remove duplicate copies of trivial getcontextx.cOnly i386 and amd64 provide a non-trivial __getcontextx(). Use a commontrivial implementation in gen/ for other architectures, rather thancopying the file to each MD subdirectory.Reviewed by: kibSponsored by: The FreeBSD FoundationDifferential Revision: https://reviews.freebsd.org/D1472
Avoid use of register variables. Clang 3.5 treats this as undefined behavior,and bad things happen.MFC after: 1 week
Ensure that every ENTRY(foo) has a matching END(foo).It allows to build with newer binutilsDifferential Revision: https://reviews.freebsd.org/D877Reviewed by: jhibbits
Revert r253748,253749This WIP should not have been committed yet.Pointyhat to: avg
remove needless inclusion of machine/cpu.h in userlandMFC after: 21 days
Remove clause 3 and 4 from TNF licensesPer the NetBSD Foundation statement Third parties are encouraged to change the license on any files which have a 4-clause license contributed to the NetBS
Remove clause 3 and 4 from TNF licensesPer the NetBSD Foundation statement Third parties are encouraged to change the license on any files which have a 4-clause license contributed to the NetBSD Foundation to a 2-clause license.
The getcontext() from the __fillcontextx() call in thecheck_deferred_signal() returns twice, since handle_signal() emulatesthe return from the normal signal handler by sigreturn(2)ing thepassed co
The getcontext() from the __fillcontextx() call in thecheck_deferred_signal() returns twice, since handle_signal() emulatesthe return from the normal signal handler by sigreturn(2)ing thepassed context. Second return is performed on the destroyed stackframe, because __fillcontextx() has already returned. This causesundefined and bad behaviour, usually the victim thread gets SIGSEGV.Avoid nested frame and the need to return from it by doing direct callto getcontext() in the check_deferred_signal() and using a new privatelibc helper __fillcontextx2() to complement the context with theextended CPU state if the deferred signal is still present.The __fillcontextx() is now unused, but is kept to allow olderlibthr.so to be used with the new libc.Mark __fillcontextx() as returning twice [1].Reported by: pgjPointy hat to: kibDiscussed with: dimTested by: pgj, dimSuggested by: jilles [1]MFC after: 1 week
Do not restore the register holding the TLS pointer when doing varioususermode context switches (long jumps and ucontext operations). If theseare used across threads, multiple threads can end up wi
Do not restore the register holding the TLS pointer when doing varioususermode context switches (long jumps and ucontext operations). If theseare used across threads, multiple threads can end up with the same TLS base.Madness will then result.This makes behavior on PPC match that on x86 systems and on Linux.MFC after: 10 days
Properly resolve the _ctx_start function descriptor (the symbol _ctx_startis a descriptor, not a code address), which prevents crashes when startinga context. This fixes QEMU on powerpc64.MFC aft
Properly resolve the _ctx_start function descriptor (the symbol _ctx_startis a descriptor, not a code address), which prevents crashes when startinga context. This fixes QEMU on powerpc64.MFC after: 3 days
Replace the assembler macro WEAK_ALIAS with a new macro WEAK_REFERENCE whichhas the same API as __weak_reference(). Give 'x' in SYS.h a more meaningfulname.Tested on 32- and 64-bit PowerMac.Rev
Replace the assembler macro WEAK_ALIAS with a new macro WEAK_REFERENCE whichhas the same API as __weak_reference(). Give 'x' in SYS.h a more meaningfulname.Tested on 32- and 64-bit PowerMac.Reviewed by: bde
Make the sys/ucontext.h self-contained by changing the return typeof __getcontextx_size(3) from size_t to int.PR: ports/164654MFC after: 1 month
Add API for obtaining extended machine context states that cannot befit into existing mcontext_t.On i386 and amd64 do return the extended FPU states usinggetcontextx(3). For other architectures,
Add API for obtaining extended machine context states that cannot befit into existing mcontext_t.On i386 and amd64 do return the extended FPU states usinggetcontextx(3). For other architectures, getcontextx(3) returns thesame information as getcontext(2).Tested by: phoMFC after: 1 month
Two other places where we can use WEAK_ALIAS.
Replace a proliferation of buggy MD implementations of modf() with aworking MI one. The MI one only needs to be overridden on machineswith non-IEEE754 arithmetic. (The last supported one was the
Replace a proliferation of buggy MD implementations of modf() with aworking MI one. The MI one only needs to be overridden on machineswith non-IEEE754 arithmetic. (The last supported one was the VAX.)It can also be overridden if someone comes up with a faster one thatactually passes the regression tests -- but this is harder than it sounds.
Fix typos - remove duplicate "the".PR: bin/154928Submitted by: Eitan Adler <lists at eitanadler.com>MFC after: 3 days
Turn off default generation of userland dot symbols on powerpc64 now thatwe have a binutils that supports it. Kernel dot symbols remain on to assistDDB.
Mark assembler sources from libc as working with non-executable stack.Reviewed and tested by: nwhitehorn
Provide 64-bit PowerPC support in libc.Obtained from: projects/ppc64