-
On systems using 32 bit for time_t the sem_timedwait syscall was broken because the function used for copying the timeout value from userspace to kernel (=sem_fetch_timeout()) was always copying sizeof(struct timespec64). A 32 bit application (or more specific an application with 4 byte time_t) would only provide sizeof(struct old_timespec32). Notable changes: - The copy operation from userspace to kernel is now already done in the syscall handler. So it is always done and might fail. Reporting a failure is delayed until the timeout is being validated. - Validation: Switched to timespec64_valid() instead of our own check. Signed-off-by: Florian Bezdeka <florian.bezdeka@siemens.com> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
d47a4cdd