Advertisement
Guest User

Untitled

a guest
Jul 12th, 2018
242
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 15.35 KB | None | 0 0
  1. commit 6f6a6358666347d24b2c03a8e3bec8f07a09422c
  2. Author: Arnd Bergmann <arnd@arndb.de>
  3. Date: Fri Apr 20 21:40:19 2018 +0200
  4.  
  5. [WIP] y2038: x86: switch to new time64 syscalls
  6.  
  7. Signed-off-by: Arnd Bergmann <arnd@arndb.de>
  8.  
  9. diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
  10. index ae320a810315..487b017b799c 100644
  11. --- a/arch/x86/Kconfig
  12. +++ b/arch/x86/Kconfig
  13. @@ -12,6 +12,7 @@ config X86_32
  14. depends on !64BIT
  15. # Options that are inherently 32-bit kernel only:
  16. select ARCH_WANT_IPC_PARSE_VERSION
  17. + select 64BIT_TIME
  18. select CLKSRC_I8253
  19. select CLONE_BACKWARDS
  20. select HAVE_AOUT
  21. diff --git a/arch/x86/entry/syscalls/syscall_32.tbl b/arch/x86/entry/syscalls/syscall_32.tbl
  22. index 1c9b56f80cdf..8330934051fa 100644
  23. --- a/arch/x86/entry/syscalls/syscall_32.tbl
  24. +++ b/arch/x86/entry/syscalls/syscall_32.tbl
  25. @@ -24,7 +24,7 @@
  26. 10 i386 unlink sys_unlink __ia32_sys_unlink
  27. 11 i386 execve sys_execve __ia32_compat_sys_execve
  28. 12 i386 chdir sys_chdir __ia32_sys_chdir
  29. -13 i386 time sys_time __ia32_compat_sys_time
  30. +13 i386 time compat_sys_time __ia32_compat_sys_time
  31. 14 i386 mknod sys_mknod __ia32_sys_mknod
  32. 15 i386 chmod sys_chmod __ia32_sys_chmod
  33. 16 i386 lchown sys_lchown16 __ia32_sys_lchown16
  34. @@ -36,12 +36,12 @@
  35. 22 i386 umount sys_oldumount __ia32_sys_oldumount
  36. 23 i386 setuid sys_setuid16 __ia32_sys_setuid16
  37. 24 i386 getuid sys_getuid16 __ia32_sys_getuid16
  38. -25 i386 stime sys_stime __ia32_compat_sys_stime
  39. +25 i386 stime compat_sys_stime __ia32_compat_sys_stime
  40. 26 i386 ptrace sys_ptrace __ia32_compat_sys_ptrace
  41. 27 i386 alarm sys_alarm __ia32_sys_alarm
  42. 28 i386 oldfstat sys_fstat __ia32_sys_fstat
  43. 29 i386 pause sys_pause __ia32_sys_pause
  44. -30 i386 utime sys_utime __ia32_compat_sys_utime
  45. +30 i386 utime compat_sys_utime __ia32_compat_sys_utime
  46. 31 i386 stty
  47. 32 i386 gtty
  48. 33 i386 access sys_access __ia32_sys_access
  49. @@ -89,11 +89,11 @@
  50. 75 i386 setrlimit sys_setrlimit __ia32_compat_sys_setrlimit
  51. 76 i386 getrlimit sys_old_getrlimit __ia32_compat_sys_old_getrlimit
  52. 77 i386 getrusage sys_getrusage __ia32_compat_sys_getrusage
  53. -78 i386 gettimeofday sys_gettimeofday __ia32_compat_sys_gettimeofday
  54. -79 i386 settimeofday sys_settimeofday __ia32_compat_sys_settimeofday
  55. +78 i386 gettimeofday compat_sys_gettimeofday __ia32_compat_sys_gettimeofday
  56. +79 i386 settimeofday compat_sys_settimeofday __ia32_compat_sys_settimeofday
  57. 80 i386 getgroups sys_getgroups16 __ia32_sys_getgroups16
  58. 81 i386 setgroups sys_setgroups16 __ia32_sys_setgroups16
  59. -82 i386 select sys_old_select __ia32_compat_sys_old_select
  60. +82 i386 select compat_sys_old_select __ia32_compat_sys_old_select
  61. 83 i386 symlink sys_symlink __ia32_sys_symlink
  62. 84 i386 oldlstat sys_lstat __ia32_sys_lstat
  63. 85 i386 readlink sys_readlink __ia32_sys_readlink
  64. @@ -115,8 +115,8 @@
  65. 101 i386 ioperm sys_ioperm __ia32_sys_ioperm
  66. 102 i386 socketcall sys_socketcall __ia32_compat_sys_socketcall
  67. 103 i386 syslog sys_syslog __ia32_sys_syslog
  68. -104 i386 setitimer sys_setitimer __ia32_compat_sys_setitimer
  69. -105 i386 getitimer sys_getitimer __ia32_compat_sys_getitimer
  70. +104 i386 setitimer compat_sys_setitimer __ia32_compat_sys_setitimer
  71. +105 i386 getitimer compat_sys_getitimer __ia32_compat_sys_getitimer
  72. 106 i386 stat sys_newstat __ia32_compat_sys_newstat
  73. 107 i386 lstat sys_newlstat __ia32_compat_sys_newlstat
  74. 108 i386 fstat sys_newfstat __ia32_compat_sys_newfstat
  75. @@ -153,7 +153,7 @@
  76. 139 i386 setfsgid sys_setfsgid16 __ia32_sys_setfsgid16
  77. 140 i386 _llseek sys_llseek __ia32_sys_llseek
  78. 141 i386 getdents sys_getdents __ia32_compat_sys_getdents
  79. -142 i386 _newselect sys_select __ia32_compat_sys_select
  80. +142 i386 _newselect compat_sys_select __ia32_compat_sys_select
  81. 143 i386 flock sys_flock __ia32_sys_flock
  82. 144 i386 msync sys_msync __ia32_sys_msync
  83. 145 i386 readv sys_readv __ia32_compat_sys_readv
  84. @@ -172,8 +172,8 @@
  85. 158 i386 sched_yield sys_sched_yield __ia32_sys_sched_yield
  86. 159 i386 sched_get_priority_max sys_sched_get_priority_max __ia32_sys_sched_get_priority_max
  87. 160 i386 sched_get_priority_min sys_sched_get_priority_min __ia32_sys_sched_get_priority_min
  88. -161 i386 sched_rr_get_interval sys_sched_rr_get_interval __ia32_compat_sys_sched_rr_get_interval
  89. -162 i386 nanosleep sys_nanosleep __ia32_compat_sys_nanosleep
  90. +161 i386 sched_rr_get_interval compat_sys_sched_rr_get_interval __ia32_compat_sys_sched_rr_get_interval
  91. +162 i386 nanosleep compat_sys_nanosleep __ia32_compat_sys_nanosleep
  92. 163 i386 mremap sys_mremap __ia32_sys_mremap
  93. 164 i386 setresuid sys_setresuid16 __ia32_sys_setresuid16
  94. 165 i386 getresuid sys_getresuid16 __ia32_sys_getresuid16
  95. @@ -188,7 +188,7 @@
  96. 174 i386 rt_sigaction sys_rt_sigaction __ia32_compat_sys_rt_sigaction
  97. 175 i386 rt_sigprocmask sys_rt_sigprocmask __ia32_sys_rt_sigprocmask
  98. 176 i386 rt_sigpending sys_rt_sigpending __ia32_compat_sys_rt_sigpending
  99. -177 i386 rt_sigtimedwait sys_rt_sigtimedwait __ia32_compat_sys_rt_sigtimedwait
  100. +177 i386 rt_sigtimedwait compat_sys_rt_sigtimedwait __ia32_compat_sys_rt_sigtimedwait
  101. 178 i386 rt_sigqueueinfo sys_rt_sigqueueinfo __ia32_compat_sys_rt_sigqueueinfo
  102. 179 i386 rt_sigsuspend sys_rt_sigsuspend __ia32_sys_rt_sigsuspend
  103. 180 i386 pread64 sys_pread64 __ia32_compat_sys_x86_pread
  104. @@ -251,14 +251,14 @@
  105. 237 i386 fremovexattr sys_fremovexattr __ia32_sys_fremovexattr
  106. 238 i386 tkill sys_tkill __ia32_sys_tkill
  107. 239 i386 sendfile64 sys_sendfile64 __ia32_sys_sendfile64
  108. -240 i386 futex sys_futex __ia32_compat_sys_futex
  109. +240 i386 futex compat_sys_futex __ia32_compat_sys_futex
  110. 241 i386 sched_setaffinity sys_sched_setaffinity __ia32_compat_sys_sched_setaffinity
  111. 242 i386 sched_getaffinity sys_sched_getaffinity __ia32_compat_sys_sched_getaffinity
  112. 243 i386 set_thread_area sys_set_thread_area __ia32_sys_set_thread_area
  113. 244 i386 get_thread_area sys_get_thread_area __ia32_sys_get_thread_area
  114. 245 i386 io_setup sys_io_setup __ia32_compat_sys_io_setup
  115. 246 i386 io_destroy sys_io_destroy __ia32_sys_io_destroy
  116. -247 i386 io_getevents sys_io_getevents __ia32_compat_sys_io_getevents
  117. +247 i386 io_getevents compat_sys_io_getevents __ia32_compat_sys_io_getevents
  118. 248 i386 io_submit sys_io_submit __ia32_compat_sys_io_submit
  119. 249 i386 io_cancel sys_io_cancel __ia32_sys_io_cancel
  120. 250 i386 fadvise64 sys_fadvise64 __ia32_compat_sys_x86_fadvise64
  121. @@ -271,18 +271,18 @@
  122. 257 i386 remap_file_pages sys_remap_file_pages __ia32_sys_remap_file_pages
  123. 258 i386 set_tid_address sys_set_tid_address __ia32_sys_set_tid_address
  124. 259 i386 timer_create sys_timer_create __ia32_compat_sys_timer_create
  125. -260 i386 timer_settime sys_timer_settime __ia32_compat_sys_timer_settime
  126. -261 i386 timer_gettime sys_timer_gettime __ia32_compat_sys_timer_gettime
  127. +260 i386 timer_settime compat_sys_timer_settime __ia32_compat_sys_timer_settime
  128. +261 i386 timer_gettime compat_sys_timer_gettime __ia32_compat_sys_timer_gettime
  129. 262 i386 timer_getoverrun sys_timer_getoverrun __ia32_sys_timer_getoverrun
  130. 263 i386 timer_delete sys_timer_delete __ia32_sys_timer_delete
  131. -264 i386 clock_settime sys_clock_settime __ia32_compat_sys_clock_settime
  132. -265 i386 clock_gettime sys_clock_gettime __ia32_compat_sys_clock_gettime
  133. -266 i386 clock_getres sys_clock_getres __ia32_compat_sys_clock_getres
  134. -267 i386 clock_nanosleep sys_clock_nanosleep __ia32_compat_sys_clock_nanosleep
  135. +264 i386 clock_settime compat_sys_clock_settime __ia32_compat_sys_clock_settime
  136. +265 i386 clock_gettime compat_sys_clock_gettime __ia32_compat_sys_clock_gettime
  137. +266 i386 clock_getres compat_sys_clock_getres __ia32_compat_sys_clock_getres
  138. +267 i386 clock_nanosleep compat_sys_clock_nanosleep __ia32_compat_sys_clock_nanosleep
  139. 268 i386 statfs64 sys_statfs64 __ia32_compat_sys_statfs64
  140. 269 i386 fstatfs64 sys_fstatfs64 __ia32_compat_sys_fstatfs64
  141. 270 i386 tgkill sys_tgkill __ia32_sys_tgkill
  142. -271 i386 utimes sys_utimes __ia32_compat_sys_utimes
  143. +271 i386 utimes compat_sys_utimes __ia32_compat_sys_utimes
  144. 272 i386 fadvise64_64 sys_fadvise64_64 __ia32_compat_sys_x86_fadvise64_64
  145. 273 i386 vserver
  146. 274 i386 mbind sys_mbind __ia32_sys_mbind
  147. @@ -290,8 +290,8 @@
  148. 276 i386 set_mempolicy sys_set_mempolicy __ia32_sys_set_mempolicy
  149. 277 i386 mq_open sys_mq_open __ia32_compat_sys_mq_open
  150. 278 i386 mq_unlink sys_mq_unlink __ia32_sys_mq_unlink
  151. -279 i386 mq_timedsend sys_mq_timedsend __ia32_compat_sys_mq_timedsend
  152. -280 i386 mq_timedreceive sys_mq_timedreceive __ia32_compat_sys_mq_timedreceive
  153. +279 i386 mq_timedsend compat_sys_mq_timedsend __ia32_compat_sys_mq_timedsend
  154. +280 i386 mq_timedreceive compat_sys_mq_timedreceive __ia32_compat_sys_mq_timedreceive
  155. 281 i386 mq_notify sys_mq_notify __ia32_compat_sys_mq_notify
  156. 282 i386 mq_getsetattr sys_mq_getsetattr __ia32_compat_sys_mq_getsetattr
  157. 283 i386 kexec_load sys_kexec_load __ia32_compat_sys_kexec_load
  158. @@ -310,7 +310,7 @@
  159. 296 i386 mkdirat sys_mkdirat __ia32_sys_mkdirat
  160. 297 i386 mknodat sys_mknodat __ia32_sys_mknodat
  161. 298 i386 fchownat sys_fchownat __ia32_sys_fchownat
  162. -299 i386 futimesat sys_futimesat __ia32_compat_sys_futimesat
  163. +299 i386 futimesat compat_sys_futimesat __ia32_compat_sys_futimesat
  164. 300 i386 fstatat64 sys_fstatat64 __ia32_compat_sys_x86_fstatat
  165. 301 i386 unlinkat sys_unlinkat __ia32_sys_unlinkat
  166. 302 i386 renameat sys_renameat __ia32_sys_renameat
  167. @@ -319,8 +319,8 @@
  168. 305 i386 readlinkat sys_readlinkat __ia32_sys_readlinkat
  169. 306 i386 fchmodat sys_fchmodat __ia32_sys_fchmodat
  170. 307 i386 faccessat sys_faccessat __ia32_sys_faccessat
  171. -308 i386 pselect6 sys_pselect6 __ia32_compat_sys_pselect6
  172. -309 i386 ppoll sys_ppoll __ia32_compat_sys_ppoll
  173. +308 i386 pselect6 compat_sys_pselect6 __ia32_compat_sys_pselect6
  174. +309 i386 ppoll compat_sys_ppoll __ia32_compat_sys_ppoll
  175. 310 i386 unshare sys_unshare __ia32_sys_unshare
  176. 311 i386 set_robust_list sys_set_robust_list __ia32_compat_sys_set_robust_list
  177. 312 i386 get_robust_list sys_get_robust_list __ia32_compat_sys_get_robust_list
  178. @@ -331,13 +331,13 @@
  179. 317 i386 move_pages sys_move_pages __ia32_compat_sys_move_pages
  180. 318 i386 getcpu sys_getcpu __ia32_sys_getcpu
  181. 319 i386 epoll_pwait sys_epoll_pwait __ia32_sys_epoll_pwait
  182. -320 i386 utimensat sys_utimensat __ia32_compat_sys_utimensat
  183. +320 i386 utimensat compat_sys_utimensat __ia32_compat_sys_utimensat
  184. 321 i386 signalfd sys_signalfd __ia32_compat_sys_signalfd
  185. 322 i386 timerfd_create sys_timerfd_create __ia32_sys_timerfd_create
  186. 323 i386 eventfd sys_eventfd __ia32_sys_eventfd
  187. 324 i386 fallocate sys_fallocate __ia32_compat_sys_x86_fallocate
  188. -325 i386 timerfd_settime sys_timerfd_settime __ia32_compat_sys_timerfd_settime
  189. -326 i386 timerfd_gettime sys_timerfd_gettime __ia32_compat_sys_timerfd_gettime
  190. +325 i386 timerfd_settime compat_sys_timerfd_settime __ia32_compat_sys_timerfd_settime
  191. +326 i386 timerfd_gettime compat_sys_timerfd_gettime __ia32_compat_sys_timerfd_gettime
  192. 327 i386 signalfd4 sys_signalfd4 __ia32_compat_sys_signalfd4
  193. 328 i386 eventfd2 sys_eventfd2 __ia32_sys_eventfd2
  194. 329 i386 epoll_create1 sys_epoll_create1 __ia32_sys_epoll_create1
  195. @@ -348,7 +348,7 @@
  196. 334 i386 pwritev sys_pwritev __ia32_compat_sys_pwritev
  197. 335 i386 rt_tgsigqueueinfo sys_rt_tgsigqueueinfo __ia32_compat_sys_rt_tgsigqueueinfo
  198. 336 i386 perf_event_open sys_perf_event_open __ia32_sys_perf_event_open
  199. -337 i386 recvmmsg sys_recvmmsg __ia32_compat_sys_recvmmsg
  200. +337 i386 recvmmsg compat_sys_recvmmsg __ia32_compat_sys_recvmmsg
  201. 338 i386 fanotify_init sys_fanotify_init __ia32_sys_fanotify_init
  202. 339 i386 fanotify_mark sys_fanotify_mark __ia32_compat_sys_fanotify_mark
  203. 340 i386 prlimit64 sys_prlimit64 __ia32_sys_prlimit64
  204. @@ -404,3 +404,42 @@
  205. 390 i386 fsmount sys_fsmount __ia32_sys_fsmount
  206. 391 i386 fspick sys_fspick __ia32_sys_fspick
  207. 392 i386 fsinfo sys_fsinfo __ia32_sys_fsinfo
  208. +
  209. +# some space left to avoid rebasing for each new syscall
  210. +400 i386 clock_gettime64 sys_clock_gettime __ia32_sys_clock_gettime
  211. +401 i386 clock_settime64 sys_clock_settime __ia32_sys_clock_settime
  212. +402 i386 clock_adjtime64 sys_clock_adjtime __ia32_sys_clock_adjtime
  213. +403 i386 clock_getres_time64 sys_clock_getres __ia32_sys_clock_getres
  214. +404 i386 timer_gettime64 sys_timer_gettime __ia32_sys_timer_gettime
  215. +405 i386 timer_settime64 sys_timer_settime __ia32_sys_timer_settime
  216. +406 i386 timerfd_gettime64 sys_timerfd_gettime __ia32_sys_timerfd_gettime
  217. +407 i386 timerfd_settime64 sys_timerfd_settime __ia32_sys_timerfd_settime
  218. +408 i386 pselect6_time64 sys_pselect6 __ia32_compat_sys_pselect6_time64
  219. +409 i386 ppoll_time64 sys_ppoll __ia32_compat_sys_ppoll_time64
  220. +410 i386 io_getevents_time64 sys_io_getevents __ia32_sys_io_getevents
  221. +411 i386 io_pgetevents_time64 sys_io_pgetevents __ia32_sys_io_pgetevents
  222. +412 i386 recvmmsg_time64 sys_recvmmsg __ia32_compat_sys_recvmmsg_time64
  223. +413 i386 mq_timedsend_time64 sys_mq_timedsend __ia32_sys_mq_timedsend
  224. +415 i386 mq_timedreceiv_time64 sys_mq_timedreceive __ia32_sys_mq_timedreceive
  225. +416 i386 utimensat_time64 sys_utimensat __ia32_sys_utimensat
  226. +417 i386 rt_sigtimedwait_time64 sys_rt_sigtimedwait __ia32_compat_sys_rt_sigtimedwait
  227. +418 i386 futex_time64 sys_futex __ia32_sys_futex
  228. +419 i386 sched_rr_get_interval_time64 sys_sched_rr_get_interval __ia32_sys_sched_rr_get_interval
  229. +# missing IPC syscalls
  230. +420 i386 semget sys_semget __ia32_sys_semget
  231. +421 i386 semctl sys_semctl __ia32_sys_semctl
  232. +414 i386 semtimedop compat_sys_semtimedop __ia32_compat_sys_semtimedop
  233. +422 i386 semtimedop_time64 sys_semtimedop __ia32_sys_semtimedop
  234. +423 i386 shmget sys_shmget __ia32_sys_shmget
  235. +424 i386 shmctl sys_shmctl __ia32_sys_shmctl
  236. +425 i386 shmat sys_shmat __ia32_sys_shmat
  237. +426 i386 shmdt sys_shmdt __ia32_sys_shmdt
  238. +427 i386 msgget sys_msgget __ia32_sys_msgget
  239. +428 i386 msgsnd sys_msgsnd __ia32_sys_msgsnd
  240. +429 i386 msgrcv sys_msgrcv __ia32_sys_msgrcv
  241. +430 i386 msgctl sys_msgctl __ia32_sys_msgctl
  242. +431 i386 waitid_time64 sys_waitid_time64 __ia32_compat_sys_waitid_time64
  243. +432 i386 getrusage_time64 sys_getrusage_time64 __ia32_compat_sys_getrusage_time64
  244. +434 i386 getitimer64 sys_getitimer64 __ia32_sys_getitimer64
  245. +435 i386 setitimer64 sys_setitimer64 __ia32_sys_setitimer64
  246. +436 i386 clock_nanosleep_time64 sys_clock_nanosleep __ia32_clock_nanosleep
  247. diff --git a/arch/x86/include/asm/unistd.h b/arch/x86/include/asm/unistd.h
  248. index 7d784b8bceb4..ca73ef72530b 100644
  249. --- a/arch/x86/include/asm/unistd.h
  250. +++ b/arch/x86/include/asm/unistd.h
  251. @@ -23,8 +23,8 @@
  252.  
  253. # include <asm/unistd_64.h>
  254. # include <asm/unistd_64_x32.h>
  255. -# define __ARCH_WANT_COMPAT_SYS_TIME
  256. -# define __ARCH_WANT_COMPAT_SYS_UTIME
  257. +# define __ARCH_WANT_SYS_TIME
  258. +# define __ARCH_WANT_SYS_UTIME
  259. # define __ARCH_WANT_COMPAT_SYS_PREADV64
  260. # define __ARCH_WANT_COMPAT_SYS_PWRITEV64
  261. # define __ARCH_WANT_COMPAT_SYS_PREADV64V2
  262. @@ -48,8 +48,8 @@
  263. # define __ARCH_WANT_SYS_SIGPENDING
  264. # define __ARCH_WANT_SYS_SIGPROCMASK
  265. # define __ARCH_WANT_SYS_SOCKETCALL
  266. -# define __ARCH_WANT_SYS_TIME
  267. -# define __ARCH_WANT_SYS_UTIME
  268. +# define __ARCH_WANT_COMPAT_SYS_TIME
  269. +# define __ARCH_WANT_COMPAT_SYS_UTIME
  270. # define __ARCH_WANT_SYS_WAITPID
  271. # define __ARCH_WANT_SYS_FORK
  272. # define __ARCH_WANT_SYS_VFORK
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement