| Commit message (Expand) | Author | Age | Files | Lines |
| * | reformat clock_adjtime with always-true condition removed | Rich Felker | 2020-06-02 | 1 | -48/+46 |
| * | always use time64 syscall first for clock_adjtime•••clock_adjtime always returns the current clock setting in struct
timex, so it's always possible that the time64 version is needed.
| Rich Felker | 2020-06-02 | 1 | -2/+1 |
| * | fix broken time64 clock_adjtime•••the 64-bit time code path used the wrong (time32) syscall. fortunately
this code path is not yet taken unless attempting to set a post-Y2038
time.
| Rich Felker | 2020-06-02 | 1 | -1/+1 |
| * | clock_adjtime: generalize time64 not to assume old struct layout match•••commit 2b4fd6f75b4fa66d28cddcf165ad48e8fda486d1 added time64 for this
function, but did so with a hidden assumption that the new time64
version of struct timex will be layout-compatible with the old one.
however, there is little benefit to doing it that way, and the cost is
permanent special-casing of 32-bit archs with 64-bit time_t in the
public interface definitions.
instead, do a full translation of the structure going in and out. this
commit is actually a revision to an earlier uncommited version of the
code.
| Rich Felker | 2019-10-20 | 1 | -11/+46 |
| * | clock_adjtime: add time64 support, decouple 32-bit time_t, fix x32•••the 64-bit/time64 version of the syscall is not API-compatible with
the userspace timex structure definition; fields specified as long
have type long long. so when using the time64 syscall, we have to
convert the entire structure. this was always the case for x32 as
well, but went unnoticed, meaning that clock_adjtime just passed junk
to the kernel on x32. it should be fixed now.
for the fallback case, we avoid encoding any assumptions about the new
location of the time member or naming of the legacy slots by accessing
them through a union of the kernel type and the new userspace type.
the only assumption is that the non-time members live at the same
offsets as in the (non-time64, long-based) kernel timex struct. this
property saves us from having to convert the whole thing, and avoids a
lot of additional work in compat shims.
the new code is statically unreachable for now except on x32, where it
fixes major brokenness. it is permanently unreachable on 64-bit.
| Rich Felker | 2019-08-02 | 1 | -0/+110 |
| * | refactor adjtimex in terms of clock_adjtime•••this sets the stage for having the conversion logic for 64-bit time_t
all in one file, and as a bonus makes clock_adjtime for CLOCK_REALTIME
work even on kernels too old to have the clock_adjtime syscall.
| Rich Felker | 2019-07-20 | 1 | -0/+2 |
| * | include cleanups: remove unused headers and add feature test macros | Szabolcs Nagy | 2013-12-12 | 1 | -2/+0 |
| * | add clock_adjtime, remap_file_pages, and syncfs syscall wrappers•••patch by Justin Cormack, with slight modification
| Rich Felker | 2012-09-16 | 1 | -0/+9 |