diff options
author | Rich Felker <dalias@aerifal.cx> | 2020-01-30 11:25:07 -0500 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2020-01-30 11:25:07 -0500 |
commit | 5a105f19b5aae79dd302899e634b6b18b3dcd0d6 (patch) | |
tree | b96bcfdc32cdbf4a16eaf1fea74e4c52bffd52ba /arch/microblaze/bits | |
parent | e6093b5a870a38ebfb3e54382acd48c698bde15d (diff) | |
download | musl-5a105f19b5aae79dd302899e634b6b18b3dcd0d6.tar.gz musl-5a105f19b5aae79dd302899e634b6b18b3dcd0d6.tar.bz2 musl-5a105f19b5aae79dd302899e634b6b18b3dcd0d6.tar.xz musl-5a105f19b5aae79dd302899e634b6b18b3dcd0d6.zip |
remove legacy clock_gettime and gettimeofday from public syscall.h
some nontrivial number of applications have historically performed
direct syscalls for these operations rather than using the public
functions. such usage is invalid now that time_t is 64-bit and these
syscalls no longer match the types they are used with, and it was
already harmful before (by suppressing use of vdso).
since syscall() has no type safety, incorrect usage of these syscalls
can't be caught at compile-time. so, without manually inspecting or
running additional tools to check sources, the risk of such errors
slipping through is high.
this patch renames the syscalls on 32-bit archs to clock_gettime32 and
gettimeofday_time32, so that applications using the original names
will fail to build without being fixed.
note that there are a number of other syscalls that may also be unsafe
to use directly after the time64 switchover, but (1) these are the
main two that seem to be in widespread use, and (2) most of the others
continue to have valid usage with a null timeval/timespec argument, as
the argument is an optional timeout or similar.
Diffstat (limited to 'arch/microblaze/bits')
-rw-r--r-- | arch/microblaze/bits/syscall.h.in | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/microblaze/bits/syscall.h.in b/arch/microblaze/bits/syscall.h.in index afefb354..b23fe6ef 100644 --- a/arch/microblaze/bits/syscall.h.in +++ b/arch/microblaze/bits/syscall.h.in @@ -76,7 +76,7 @@ #define __NR_setrlimit 75 #define __NR_getrlimit 76 #define __NR_getrusage 77 -#define __NR_gettimeofday 78 +#define __NR_gettimeofday_time32 78 #define __NR_settimeofday 79 #define __NR_getgroups 80 #define __NR_setgroups 81 @@ -260,7 +260,7 @@ #define __NR_timer_getoverrun 262 #define __NR_timer_delete 263 #define __NR_clock_settime 264 -#define __NR_clock_gettime 265 +#define __NR_clock_gettime32 265 #define __NR_clock_getres 266 #define __NR_clock_nanosleep 267 #define __NR_statfs64 268 |