android_kernel_motorola_sm6375/arch/alpha
Repository files (latest commit first)
Filename Latest commit message Latest commit date
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 <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
2019-04-19 14:07:40 -07:00
..
boot kbuild: Rename HOSTCFLAGS to KBUILD_HOSTCFLAGS 2018-07-18 01:18:05 +09:00
include net: socket: implement 64-bit timestamps 2019-04-19 14:07:40 -07:00
kernel treewide: add checks for the return value of memblock_alloc*() 2019-03-12 10:04:02 -07:00
lib Remove 'type' argument from access_ok() function 2019-01-03 18:57:57 -08:00
math-emu
mm alpha: fix page fault handling for r16-r18 targets 2019-02-10 20:42:23 -08:00
oprofile
defconfig
Kconfig Kconfig file consolidation for v4.21 2018-12-29 13:40:29 -08:00
Kconfig.debug Kconfig: consolidate the "Kernel hacking" menu 2018-08-02 08:06:48 +09:00
Makefile alpha: generate uapi header and syscall table header files 2018-12-21 11:57:56 -05:00