about summary refs log tree commit diff
path: root/sysdeps
Commit message (Collapse)AuthorAgeFilesLines
...
* aarch64: morello: rtld: add ld.so _start codeSzabolcs Nagy2022-08-051-0/+68
| | | | | The purecap version of aarch64 dl-start.S. Note: self relocation of ld.so is handled by the rtld bootstrap code.
* aarch64: morello: rtld: define DL_RO_DYN_SECTIONSzabolcs Nagy2022-08-051-0/+25
| | | | The dynamic section cannot be relocated to hold pointers in place.
* aarch64: morello: fix ldconfig for purecap abiSzabolcs Nagy2022-08-054-1/+20
| | | | | | Add purecap ld cache flag. Add the purecap ld.so name to known names. Handle lib64c system library paths. And set the purecap abi flag on cache entries.
* aarch64: morello: disable the vpcs testSzabolcs Nagy2022-08-051-1/+1
| | | | The asm code of the test is for lp64 ABI only.
* aarch64: morello: add purecap ucontext supportCarlos Eduardo Seo2022-08-059-0/+493
| | | | | | | | | Adjust ucontext layout for purecap ABI and add make/get/set/swapcontext implementations accordingly. Note: mcontext layout follows the linux sigcontext struct, in userspace *context functions rely on the c registers stored in the extension area and ignore the mcontext fields for x registers.
* aarch64: morello: add purecap setjmp/longjmpCarlos Eduardo Seo2022-08-053-1/+176
| | | | | Similar to lp64 setjmp/longjmp, but handles capability registers. Save q regs instead of d regs to simplify the offset computation.
* cheri: rseq: remove const to avoid readonly permissionSzabolcs Nagy2022-08-051-0/+14
| | | | | | | | | | Using const on the definition does not work for a pure capability ABI: the capability permissions when accessing the object will be read only. Use a hack to hide the public declaration in the TU where the const objects are initialized. (This should work on non-capability targets too, but to err on the safe side only enable the hack on capability targets.)
* aarch64: morello: nptl: fix thread pointer setupSzabolcs Nagy2022-08-051-0/+5
|
* aarch64: morello: nptl: fix pthread types for 128 bit pointersSzabolcs Nagy2022-08-051-1/+11
|
* cheri: nptl: fix pthread_attr_t alignmentSzabolcs Nagy2022-08-051-0/+1
| | | | | Alignment of the public definition did not match the internal layout. Ensure that the type is at least pointer aligned.
* cheri: nptl: fix thread ID types for capabilitiesSzabolcs Nagy2022-08-052-0/+8
|
* cheri: Implement 128-bit atomicsSzabolcs Nagy2022-08-051-0/+21
| | | | Arm Morello requires 128-bit atomics.
* cheri: elf: use elfptr_t for auxv parsingSzabolcs Nagy2022-08-051-2/+2
|
* cheri: fix static linking early allocationSzabolcs Nagy2022-08-051-1/+1
| | | | Store mmap result to intptr_t instead of long.
* TODO(gcc): cheri: work around a gcc bug in _dl_setup_stack_chk_guardSzabolcs Nagy2022-08-051-0/+4
| | | | | | | | | | | morello purecap gcc in some cases inlines 16byte memcpy as a capability load, which is wrong if the source or dest may be unaligned. stack guard only needs random for the address portion since only that part is compared, so 8 byte is enough with 64 bit addresses, but the current code is only right on little endian systems. TODO: drop when gcc is fixed
* cheri: don't use dl_random for pointer manglingSzabolcs Nagy2022-08-051-0/+5
| | | | | | | | Pointer mangling cannot be supported on capability architectures. And there is not enough bytes in dl_random for 128 bit pointers. Stack guard is still loaded from dl_random: stack protection is unlikely to be useful on a capability architecture, but it works.
* TODO(ddc): aarch64: morello: purecap support in the CSUCarlos Eduardo Seo2022-08-053-0/+357
| | | | | | | | | | | Purecap ABI versions of start.S, crti.S and crtn.S. TODO: must not use ddc but caps from auxv TODO: start.S: dynamic linked case is now detected by x0 != 0 (ld.so passes __rtld_fini there), but the value of c0 on entry is not abi, just that it has to be passed back to the libc start code in c5, so ideally the linker should be fixed to reliably emit __rela_dyn_start when a static exe must self relocate.
* cheri: aarch64: Add header for CHERI permissionsCarlos Eduardo Seo2022-08-051-0/+66
| | | | | | | | | New file containing the capability permission bits. The capability permission bits are defined in the Arm Architecture Reference Manual Suplement- Morello for A-Profile Architecture: https://developer.arm.com/documentation/ddi0606/latest
* TODO(uapi): aarch64: morello: use non-ifunc gettimeofdaySzabolcs Nagy2022-08-051-1/+3
| | | | TODO: Remove this once morello has vdso gettimeofday.
* TODO(uapi): aarch64: morello: make brk always failSzabolcs Nagy2022-08-051-0/+25
| | | | TODO: drop this once linux brk always fails.
* TODO(uapi): cheri: fix clone_argsSzabolcs Nagy2022-08-052-0/+27
| | | | | | | Current clone_args does not support 128 bit pointers. TODO: the fix is incomplete (missing clone3 abi checks) and has to be aligned with purecap clone3 struct layout.
* aarch64: morello: fix missing variadic argument in fcntlSzabolcs Nagy2022-08-053-2/+12
| | | | | | | | | | In fcntl va_arg is currently used even if the caller did not pass any variadic arguments. This is undefined behaviour and does not work with the Morello purecap ABI, so use a helper macro. When the argument is missing, the result of the helper macro is arbitrary as it will be ignored by the kernel, we just have to ensure it does not cause a runtime crash.
* aarch64: morello: fix vforkSzabolcs Nagy2022-08-051-1/+1
| | | | | No need to set the child stack to sp, 0 means the parent stack is used. This avoids purecap specific ifdefs in vfork.
* aarch64: morello: add purecap syscall supportCarlos Eduardo Seo2022-08-054-16/+185
| | | | | | Support the Morello Linux purecap syscall ABI. The macro definitions are moved to a morello specific sysdep.h to avoid cluttering the aarch64 one.
* aarch64: fix VDSO setup to only apply to known ABIsSzabolcs Nagy2022-08-051-1/+3
| | | | New syscall ABI requires different VDSO support code.
* TODO(api): cheri: fix syscall return typeSzabolcs Nagy2022-08-051-1/+7
| | | | | TODO: this affects API (syscall return type is long) so breaks portability and requires doc updates.
* aarch64: morello: string: memcpySzabolcs Nagy2022-08-051-0/+486
| | | | from arm optimized-routines morello branch.
* aarch64: morello: string: memsetSzabolcs Nagy2022-08-051-0/+154
| | | | memset from arm optimized-routines morello branch.
* aarch64: morello: string: dummy c memcmpSzabolcs Nagy2022-08-051-0/+38
|
* aarch64: morello: string: dummy c memchrSzabolcs Nagy2022-08-051-0/+33
|
* aarch64: morello: string: dummy c memrchrSzabolcs Nagy2022-08-051-0/+32
|
* aarch64: morello: purecap rawmemchrCarlos Eduardo Seo2022-08-051-0/+43
| | | | Modified rawmemchr to support Arm Morello Capabilities.
* aarch64: morello: string: dummy c strchrnulSzabolcs Nagy2022-08-051-0/+30
|
* aarch64: morello: string: dummy c strlenSzabolcs Nagy2022-08-051-0/+30
|
* aarch64: morello: string: dummy c strnlenSzabolcs Nagy2022-08-051-0/+31
|
* aarch64: morello: string: dummy c strcpy and stpcpySzabolcs Nagy2022-08-052-0/+62
|
* aarch64: morello: string: dummy c strcmpSzabolcs Nagy2022-08-051-0/+30
|
* aarch64: morello: string: dummy c strncmpSzabolcs Nagy2022-08-051-0/+32
|
* aarch64: morello: string: dummy c strchrSzabolcs Nagy2022-08-051-0/+33
|
* aarch64: morello: string: dummy c strrchrSzabolcs Nagy2022-08-051-0/+29
|
* aarch64: morello: string: dummy c strspnSzabolcs Nagy2022-08-051-0/+40
| | | | avoids out of bound access of the generic implementation.
* aarch64: morello: string: dummy c strcspnSzabolcs Nagy2022-08-051-0/+35
| | | | avoids out of bounds access of the generic implementation.
* aarch64: morello: update sysdep.h for purecap ABICarlos Eduardo Seo2022-08-051-2/+18
| | | | Add macro definitions for purecap ABI in sysdep.h.
* TODO(spec): cheri: __LP64__ is not defined for purecap ABICarlos Eduardo Seo2022-08-052-2/+2
| | | | | | TODO: there is no good ABI macro to check, for now we assume __CHERI_PURE_CAPABILITY__ implies 64 bit long, 64 bit address and 128 bit pointer.
* aarch64: morello: use separate c++-types.dataSzabolcs Nagy2022-08-052-0/+67
| | | | | The c++ mangling ABI for intptr_t and pthread_t are different on morello.
* aarch64: morello: use separate localplt data for morelloSzabolcs Nagy2022-08-052-0/+15
| | | | There is no longer PLT reference to matherr in libm.
* aarch64: morello: Add separate lp64 and morello linux abilistsSzabolcs Nagy2022-08-0528-2/+3347
| | | | The base symbol version is 2.36.
* aarch64: morello: Add purecap abi-variants on linuxSzabolcs Nagy2022-08-051-2/+6
|
* aarch64: morello: configure change for purecap abiSzabolcs Nagy2022-08-052-13/+67
| | | | | | | Detect default-abi and add aarch64-purecap make variable. Purecap abi sets HIDDEN_VAR_NEEDS_DYNAMIC_RELOC and unsets SUPPORT_STATIC_PIE.
* aarch64: morello: Use separate lp64 and morello sysdep directoriesSzabolcs Nagy2022-08-051-1/+6
| | | | | | | | | Provide separate directories for lp64 and purecap abi related sysdep functionality. purecap may be better name than morello, but we started with morello and that is more future compatible with alternative cheri-like extensions on top of aarch64.