Age | Commit message (Collapse) | Author |
|
The correct one is `struct ucontext` -> `ucontext_t`.
Signed-off-by: Dmitry Chestnykh <dm.chestnykh@gmail.com>
|
|
The correct typedef is `struct ucontext` -> `ucontext_t`,
not `struct ucontext_t` -> `ucontext_t` like for other architectures.
Signed-off-by: Dmitry Chestnykh <dm.chestnykh@gmail.com>
|
|
Add missing includes and function decls.
Signed-off-by: Dmitry Chestnykh <dm.chestnykh@gmail.com>
|
|
Signed-off-by: Dmitry Chestnykh <dm.chestnykh@gmail.com>
|
|
This reverts commit 6b6f51c21dd29685bd1339de0bdffc0929316c63.
|
|
- Include sys/types.h instead of asm/types.h
to prevent types conflict for uClibc typedefs and kernel headers
typedefs.
- Cast 3rd arg of utimensat_time64 syscall to integer type
to avoid compiler's -Wint-conversion error. The error was found
during uClibc compilation for mips32.
Signed-off-by: Dmitry Chestnykh <dm.chestnykh@gmail.com>
|
|
The commit 74ca8d6f5d2e ("remove UCLIBC_HAS_LFS") removed conditional
compilation dependent on __UCLIBC_HAS_LFS__, assuming it to be always
defined, but removed the wrong branch in the definition of
kernel_stat64.
Fix kernel_stat64 definition to be stat64.
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Tested-by: Chris Packham <judge.packham@gmail.com>
|
|
Check that the size passed to memalign() is not greater than PTRDIFF_MAX
before adjusting it, otherwise it may wrap around in the adjustment.
This fixes gcc testsuite test gcc.dg/torture/pr60092.c
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
|
|
|
|
|
|
|
|
|
|
This function haven't have prologue/epilogue/cfi directives etc.
Signed-off-by: Dmitry Chestnykh <dm.chestnykh@gmail.com>
|
|
For x86 we have to copy only mask, handler and flags.
We haven't set SA_RESTORER bit in sa_flags anyway.
This patch fixes multiple test failures on x86.
Also we have to build uClibc with FP for x86 because
without FP NPTL and libgcc code cannot properly unwind
the stack during asynchronous cancellation of system calls.
Signed-off-by: Dmitry Chestnykh <dm.chestnykh@gmail.com>
|
|
- Cleanup dl-vdso.c code.
- Pass `void *` as first arg to `load_vdso()`, using 32-bit type
is completely wrong on 64bit architectures.
- Split libc code and vDSO-related code.
Move arch-specific implementations into separate files.
The performance improvement is for example 50-60 times on ARMv7
and about 4 times on x86_64.
Signed-off-by: Dmitry Chestnykh <dm.chestnykh@gmail.com>
|
|
Remove ^L (0x0c) chars from source code.
Signed-off-by: Petr Vorel <petr.vorel@gmail.com>
|
|
|
|
- Use TIME64 by default for rv32, usage of 32-bit time
leads to a lot of incompatibilities with linux kernel 6.6.x and later
versions.
- Add some other corrections to use proper system calls on riscv32
platform.
Signed-off-by: Dmitry Chestnykh <dm.chestnykh@gmail.com>
|
|
MMU ELF
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Signed-off-by: Dmitry Chestnykh <dm.chestnykh@gmail.com>
|
|
With time64 enabled we use statx() system call and the appropriate
routines for results conversion. There is no need in `__ts32_struct`
anymore.
Signed-off-by: Dmitry Chestnykh <dm.chestnykh@gmail.com>
|
|
Previously the common definition of this structure was broken by a mistake.
Restore it correctly for all needed architectures and all use cases.
Signed-off-by: Dmitry Chestnykh <dm.chestnykh@gmail.com>
|
|
By some reason sparc ld.so cannot work properly with
statx() system call, so fallback to regular stat() family in ld.so.
Signed-off-by: Dmitry Chestnykh <dm.chestnykh@gmail.com>
|
|
Signed-off-by: Dmitry Chestnykh <dm.chestnykh@gmail.com>
|
|
Signed-off-by: Dmitry Chestnykh <dm.chestnykh@gmail.com>
|
|
To obtain correct `st_atim`, `st_mtim` and `st_ctim` fields
we need to use statx() syscall and then convert the data from the kernel
to the regular stat structure.
Signed-off-by: Dmitry Chestnykh <dm.chestnykh@gmail.com>
|
|
Signed-off-by: Dmitry Chestnykh <dm.chestnykh@gmail.com>
|
|
- Renamed `ts32_struct` to `__ts32_struct` like `__ts64_struct`
and moved its definition to the header.
- Removed extra space from TO_ITS64_P() macro.
Signed-off-by: Dmitry Chestnykh <dm.chestnykh@gmail.com>
|
|
Signed-off-by: Dmitry Chestnykh <dm.chestnykh@gmail.com>
|
|
For BE architectures there is one significant difference
in comparison with time64 support for little-endian
architectures like ARMv7.
The difference is that we strictly need to pass two 64bit
values to system calls because Linux Kernel internally uses
`struct __kernel_timespec` and similar, which consists of two
64bit fields.
For this reason many files have been changed to convert
pointers to timespec-family structures (mixed of 64bit and 32bit values)
to the pointer of the similar but 64bit-only structures
for using as system calls args.
This is general prerequisite for any BE architecture.
Signed-off-by: Dmitry Chestnykh <dm.chestnykh@gmail.com>
|
|
- xtensa is the second architecture that supports
time64 inside uClibc-ng.
- Linux Kernel always uses 32bit time variables
inside `stat` structures, so there is a need
to use `st_atime`, `st_mtime` and `st_ctime` structures with the same
32bit-wide `tv_sec` and `tv_nsec` variables even if time64 is enabled.
Signed-off-by: Dmitry Chestnykh <dm.chestnykh@gmail.com>
|
|
This patch introduces *time64 syscalls support for uClibc-ng.
Currently the redirection of syscalls to their *time64
analogs is fully supported for 32bit ARM (ARMv5, ARMv6, ARMv7).
The main changes that take effect when time64 feature is enabled are:
- sizeof(time_t) is 8.
- There is a possibility os setting date beyond year 2038.
- some syscalls are redirected:
clock_adjtime -> clock_adjtime64
clock_getres -> clock_getres_time64
clock_gettime -> clock_gettime64
clock_nanosleep -> clock_nanosleep_time64
clock_settime -> clock_settime64
futex -> futex_time64
mq_timedreceive -> mq_timedreceive_time64
mq_timedsend -> mq_timedsend_time64
ppoll -> ppoll_time64
pselect6 -> pselect6_time64
recvmmsg -> recvmmsg_time64
rt_sigtimedwait -> rt_sigtimedwait_time64
sched_rr_get_interval -> sched_rr_get_interval_time64
semtimedop -> semtimedop_time64
timer_gettime -> timer_gettime64
timer_settime -> timer_settime64
timerfd_gettime -> timerfd_gettime64
timerfd_settime -> timerfd_settime64
utimensat -> utimensat_time64.
- settimeofday uses clock_settime (like in glibc/musl).
- gettimeofday uses clock_gettime (like in glibc/musl).
- nanosleep uses clock_nanosleep (like in glibc/musl).
- There are some fixes in data structures used by libc and kernel
for correct data handling both with and without enabled time64 support.
Signed-off-by: Dmitry Chestnykh <dm.chestnykh@gmail.com>
|
|
|
|
While they are not a problem per-se they cause issues with some tooling
(such as clang coverage) and are confusing to the reader.
|