| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
| |
The purecap version of aarch64 dl-start.S. Note: self relocation of
ld.so is handled by the rtld bootstrap code.
|
|
|
|
| |
The dynamic section cannot be relocated to hold pointers in place.
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
The asm code of the test is for lp64 ABI only.
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Similar to lp64 setjmp/longjmp, but handles capability registers.
Save q regs instead of d regs to simplify the offset computation.
|
|
|
|
|
|
|
|
|
|
| |
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.)
|
| |
|
| |
|
|
|
|
|
| |
Alignment of the public definition did not match the internal layout.
Ensure that the type is at least pointer aligned.
|
| |
|
|
|
|
| |
Arm Morello requires 128-bit atomics.
|
| |
|
|
|
|
| |
Store mmap result to intptr_t instead of long.
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
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: Remove this once morello has vdso gettimeofday.
|
|
|
|
| |
TODO: drop this once linux brk always fails.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
No need to set the child stack to sp, 0 means the parent stack is used.
This avoids purecap specific ifdefs in vfork.
|
|
|
|
|
|
| |
Support the Morello Linux purecap syscall ABI. The macro definitions
are moved to a morello specific sysdep.h to avoid cluttering the
aarch64 one.
|
|
|
|
| |
New syscall ABI requires different VDSO support code.
|
|
|
|
|
| |
TODO: this affects API (syscall return type is long)
so breaks portability and requires doc updates.
|
|
|
|
| |
from arm optimized-routines morello branch.
|
|
|
|
| |
memset from arm optimized-routines morello branch.
|
| |
|
| |
|
| |
|
|
|
|
| |
Modified rawmemchr to support Arm Morello Capabilities.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
avoids out of bound access of the generic implementation.
|
|
|
|
| |
avoids out of bounds access of the generic implementation.
|
|
|
|
| |
Add macro definitions for purecap ABI in sysdep.h.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
The c++ mangling ABI for intptr_t and pthread_t are different on
morello.
|
|
|
|
| |
There is no longer PLT reference to matherr in libm.
|
|
|
|
| |
The base symbol version is 2.36.
|
| |
|
|
|
|
|
|
|
| |
Detect default-abi and add aarch64-purecap make variable.
Purecap abi sets HIDDEN_VAR_NEEDS_DYNAMIC_RELOC and unsets
SUPPORT_STATIC_PIE.
|
|
|
|
|
|
|
|
|
| |
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.
|