Get rid of sa->narg. It serves no purpose; use sa->callp->sy_narg instead.Reviewed by: kibSponsored by: DARPADifferential Revision: https://reviews.freebsd.org/D26458
Use uintptr_t instead of register_t * for the stack base.- Use ustringp for the location of the argv and environment strings and allow destp to travel further down the stack for the stackgap an
Use uintptr_t instead of register_t * for the stack base.- Use ustringp for the location of the argv and environment strings and allow destp to travel further down the stack for the stackgap and auxv regions.- Update the Linux copyout_strings variants to move destp down the stack as was done for the native ABIs in r263349.- Stop allocating a space for a stack gap in the Linux ABIs. This used to hold translated system call arguments, but hasn't been used since r159992.Reviewed by: kibTested on: md64 (amd64, i386, linux64), i386 (i386, linux)Sponsored by: DARPADifferential Revision: https://reviews.freebsd.org/D22501
show more ...
Remove sv_pagesize, originally introduced with r100384.In all of the architectures we have today, we always use PAGE_SIZE.While in theory one could define different things, none of thecurrent arc
Remove sv_pagesize, originally introduced with r100384.In all of the architectures we have today, we always use PAGE_SIZE.While in theory one could define different things, none of thecurrent architectures do, even the ones that have transitioned from32-bit to 64-bit like i386 and arm. Some ancient mips binaries onother systems used 8k instead of 4k, but we don't support runningthose and likely never will due to their age and obscurity.Reviewed by: imp (who also contributed the commit message)Sponsored by: DARPA, AFRLDifferential Revision: https://reviews.freebsd.org/D19280
Use TO_PTR() to convert integers to pointers.For FreeBSD/arm64's cloudabi32 support, I'm going to need a TO_PTR() inthis place. Also use it for all of the other source files, so that thedifferenc
Use TO_PTR() to convert integers to pointers.For FreeBSD/arm64's cloudabi32 support, I'm going to need a TO_PTR() inthis place. Also use it for all of the other source files, so that thedifference remains as minimal as possible.MFC after: 2 weeks
Move struct syscall_args syscall arguments parameters container intostruct thread.For all architectures, the syscall trap handlers have to allocate thestructure on the stack. The structure takes
Move struct syscall_args syscall arguments parameters container intostruct thread.For all architectures, the syscall trap handlers have to allocate thestructure on the stack. The structure takes 88 bytes on 64bit archeswhich is not negligible. Also, it cannot be easily found by othercode, which e.g. caused duplication of some members of the structureto struct thread already. The change removes td_dbg_sc_code andtd_dbg_sc_nargs which were directly copied from syscall_args.The structure is put into the copied on fork part of the struct threadto make the syscall arguments information correct in the child afterfork.This move will also allow several more uses shortly.Reviewed by: jhb (previous version)Sponsored by: The FreeBSD FoundationMFC after: 3 weeksX-Differential revision: https://reviews.freebsd.org/D11080
Stop providing the compat_3_brand.As of r315860, the ELF image activator works fine for CloudABI without it.Reviewed by: kibMFC after: 2 weeks
Update r315753 with the proper flag name.Sponsored by: The FreeBSD FoundationMFC after: 1 week
Add a flag BI_BRAND_ONLY_STATIC to specify that the brand onlymatches static binaries.Interpretation of the 'static' there is that the binary must notspecify an interpreter. In particular, share
Add a flag BI_BRAND_ONLY_STATIC to specify that the brand onlymatches static binaries.Interpretation of the 'static' there is that the binary must notspecify an interpreter. In particular, shared objects are matched bythe brand if BI_CAN_EXEC_DYN is also set.This improves precision of the brand matching, which should eliminatesurprises due to brand ordering.Revert r315701.Discussed with and tested by: ed (previous version)Sponsored by: The FreeBSD FoundationMFC after: 1 week
Set the interpreter path to /nonexistent.CloudABI executables are statically linked and don't have aninterpreter. Setting the interpreter path to NULL used to workpreviously, but r314851 introduc
Set the interpreter path to /nonexistent.CloudABI executables are statically linked and don't have aninterpreter. Setting the interpreter path to NULL used to workpreviously, but r314851 introduced code that checks the stringunconditionally. Running CloudABI executables now causes a null pointerdereference.Looking at the rest of imgact_elf.c, it seems various other codepathsalready leaned on the fact that the interpreter path is set. Let's justgo ahead and pick an obviously incorrect interpreter path to appeaseimgact_elf.c.MFC after: 1 week
Catch up with changes to structure member names.Pointer/length pairs are now always named ${name} and ${name}_len.
Make execution of 32-bit CloudABI executables work on amd64.A nice thing about requiring a vDSO is that it makes it incredibly easyto provide full support for running 32-bit processes on 64-bit sy
Make execution of 32-bit CloudABI executables work on amd64.A nice thing about requiring a vDSO is that it makes it incredibly easyto provide full support for running 32-bit processes on 64-bit systems.Instead of letting the kernel be responsible for composing/decomposing64-bit arguments across multiple registers/stack slots, all of this cannow be done in the vDSO. This means that there is no need to provideduplicate copies of certain system calls, like the sys_lseek() andfreebsd32_lseek() we have for COMPAT_FREEBSD32.This change imports a new vDSO from the CloudABI repository that hasautomatically generated code in it that copies system call argumentsinto a buffer, padding them to eight bytes and zero-extending anypointers/size_t arguments. After returning from the kernel, it does theinverse: extracting return values, in the process truncatingpointers/size_t values to 32 bits.Obtained from: https://github.com/NuxiNL/cloudabi