OpenCloudOS-Kernel/arch
Arnd Bergmann 0768e17073 net: socket: implement 64-bit timestamps
The 'timeval' and 'timespec' data structures used for socket timestamps
are going to be redefined in user space based on 64-bit time_t in future
versions of the C library to deal with the y2038 overflow problem,
which breaks the ABI definition.

Unlike many modern ioctl commands, SIOCGSTAMP and SIOCGSTAMPNS do not
use the _IOR() macro to encode the size of the transferred data, so it
remains ambiguous whether the application uses the old or new layout.

The best workaround I could find is rather ugly: we redefine the command
code based on the size of the respective data structure with a ternary
operator. This lets it get evaluated as late as possible, hopefully after
that structure is visible to the caller. We cannot use an #ifdef here,
because inux/sockios.h might have been included before any libc header
that could determine the size of time_t.

The ioctl implementation now interprets the new command codes as always
referring to the 64-bit structure on all architectures, while the old
architecture specific command code still refers to the old architecture
specific layout. The new command number is only used when they are
actually different.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2019-04-19 14:07:40 -07:00
..
alpha net: socket: implement 64-bit timestamps 2019-04-19 14:07:40 -07:00
arc syscalls: Remove start and number from syscall_get_arguments() args 2019-04-05 09:26:43 -04:00
arm ARM: SoC fixes 2019-04-07 13:46:17 -10:00
arm64 arm64: futex: Fix FUTEX_WAKE_OP atomic ops with non-zero result value 2019-04-12 15:04:33 +01:00
c6x syscalls: Remove start and number from syscall_set_arguments() args 2019-04-05 09:27:23 -04:00
csky syscalls: Remove start and number from syscall_set_arguments() args 2019-04-05 09:27:23 -04:00
h8300 syscalls: Remove start and number from syscall_get_arguments() args 2019-04-05 09:26:43 -04:00
hexagon syscalls: Remove start and number from syscall_get_arguments() args 2019-04-05 09:26:43 -04:00
ia64 asm-generic: generalize asm/sockios.h 2019-04-19 14:07:40 -07:00
m68k KVM: export <linux/kvm_para.h> and <asm/kvm_para.h> iif KVM is supported 2019-03-28 17:27:42 +01:00
microblaze syscalls: Remove start and number from syscall_set_arguments() args 2019-04-05 09:27:23 -04:00
mips net: socket: implement 64-bit timestamps 2019-04-19 14:07:40 -07:00
nds32 syscalls: Remove start and number from syscall_set_arguments() args 2019-04-05 09:27:23 -04:00
nios2 syscalls: Remove start and number from syscall_set_arguments() args 2019-04-05 09:27:23 -04:00
openrisc syscalls: Remove start and number from syscall_set_arguments() args 2019-04-05 09:27:23 -04:00
parisc asm-generic: generalize asm/sockios.h 2019-04-19 14:07:40 -07:00
powerpc powerpc fixes for 5.1 #5 2019-04-13 09:03:09 -07:00
riscv RISC-V: Fix Maximum Physical Memory 2GiB option for 64bit systems 2019-04-10 09:41:40 -07:00
s390 syscalls: Remove start and number from syscall_set_arguments() args 2019-04-05 09:27:23 -04:00
sh net: socket: implement 64-bit timestamps 2019-04-19 14:07:40 -07:00
sparc asm-generic: generalize asm/sockios.h 2019-04-19 14:07:40 -07:00
um syscalls: Remove start and number from syscall_set_arguments() args 2019-04-05 09:27:23 -04:00
unicore32 KVM: export <linux/kvm_para.h> and <asm/kvm_para.h> iif KVM is supported 2019-03-28 17:27:42 +01:00
x86 asm-generic: generalize asm/sockios.h 2019-04-19 14:07:40 -07:00
xtensa net: socket: implement 64-bit timestamps 2019-04-19 14:07:40 -07:00
.gitignore
Kconfig Char/Misc driver patches for 5.1-rc1 2019-03-06 14:18:59 -08:00