timex: use __kernel_timex internally
struct timex is not y2038 safe. Replace all uses of timex with y2038 safe __kernel_timex. Note that struct __kernel_timex is an ABI interface definition. We could define a new structure based on __kernel_timex that is only available internally instead. Right now, there isn't a strong motivation for this as the structure is isolated to a few defined struct timex interfaces and such a structure would be exactly the same as struct timex. The patch was generated by the following coccinelle script: virtual patch @depends on patch forall@ identifier ts; expression e; @@ ( - struct timex ts; + struct __kernel_timex ts; | - struct timex ts = {}; + struct __kernel_timex ts = {}; | - struct timex ts = e; + struct __kernel_timex ts = e; | - struct timex *ts; + struct __kernel_timex *ts; | (memset \| copy_from_user \| copy_to_user \)(..., - sizeof(struct timex)) + sizeof(struct __kernel_timex)) ) @depends on patch forall@ identifier ts; identifier fn; @@ fn(..., - struct timex *ts, + struct __kernel_timex *ts, ...) { ... } @depends on patch forall@ identifier ts; identifier fn; @@ fn(..., - struct timex *ts) { + struct __kernel_timex *ts) { ... } Signed-off-by:Deepa Dinamani <deepa.kernel@gmail.com> Cc: linux-alpha@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by:
Arnd Bergmann <arnd@arndb.de>
Showing
- arch/alpha/kernel/osf_sys.c 3 additions, 2 deletionsarch/alpha/kernel/osf_sys.c
- arch/sparc/kernel/sys_sparc_64.c 2 additions, 2 deletionsarch/sparc/kernel/sys_sparc_64.c
- drivers/ptp/ptp_clock.c 1 addition, 1 deletiondrivers/ptp/ptp_clock.c
- include/linux/posix-clock.h 1 addition, 1 deletioninclude/linux/posix-clock.h
- include/linux/time32.h 3 additions, 3 deletionsinclude/linux/time32.h
- include/linux/timex.h 2 additions, 2 deletionsinclude/linux/timex.h
- kernel/time/ntp.c 10 additions, 8 deletionskernel/time/ntp.c
- kernel/time/ntp_internal.h 1 addition, 1 deletionkernel/time/ntp_internal.h
- kernel/time/posix-clock.c 1 addition, 1 deletionkernel/time/posix-clock.c
- kernel/time/posix-timers.c 4 additions, 4 deletionskernel/time/posix-timers.c
- kernel/time/posix-timers.h 1 addition, 1 deletionkernel/time/posix-timers.h
- kernel/time/time.c 7 additions, 7 deletionskernel/time/time.c
- kernel/time/timekeeping.c 2 additions, 2 deletionskernel/time/timekeeping.c
Loading
Please register or sign in to comment