History

Merge tag 'y2038-syscall-abi' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground into timers/2038

Pull additional syscall ABI cleanup for y2038 from Arnd Bergmann: This is a follow-up to the y2038 syscall patches already merged in the tip tree. As the final 32-bit RISC-V syscall ABI is still being decided on, this is the last chance to make a few corrections to leave out interfaces based on 32-bit time_t along with the old off_t and rlimit types. The series achieves this in a few steps: - A couple of bug fixes for minor regressions I introduced in the original series - A couple of older patches from Yury Norov that I had never merged in the past, these fix up the openat/open_by_handle_at and getrlimit/setrlimit syscalls to disallow the old versions of off_t and rlimit. - Hiding the deprecated system calls behind an #ifdef in include/uapi/asm-generic/unistd.h - Change arch/riscv to drop all these ABIs. Originally, the plan was to also leave these out on C-Sky, but that now has a glibc port that uses the older interfaces, so we need to leave them in place.

Thomas Gleixner committed 7 years ago

Commit cfbe2712 parents 41ea391 d4c08b936 files · +110 −8Browse files

Showing the changes to include/uapi (1 of 36 files). Show all

Unified · Split

include/uapi/asm-generic/unistd.h+43−3
@@ -38,8 +38,10 @@ __SYSCALL(__NR_io_destroy, sys_io_destroy) · 37 unmodified lines
3838 __SC_COMP(__NR_io_submit, sys_io_submit, compat_sys_io_submit)
3939 #define __NR_io_cancel 3
4040 __SYSCALL(__NR_io_cancel, sys_io_cancel)
41+#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32
4142 #define __NR_io_getevents 4
4243 __SC_3264(__NR_io_getevents, sys_io_getevents_time32, sys_io_getevents)
44+#endif
4345
4446 /* fs/xattr.c */
4547 #define __NR_setxattr 5
@@ -179,7 +181,7 @@ __SYSCALL(__NR_fchownat, sys_fchownat) · 133 unmodified lines
179181 #define __NR_fchown 55
180182 __SYSCALL(__NR_fchown, sys_fchown)
181183 #define __NR_openat 56
182−__SC_COMP(__NR_openat, sys_openat, compat_sys_openat)
184+__SYSCALL(__NR_openat, sys_openat)
183185 #define __NR_close 57
184186 __SYSCALL(__NR_close, sys_close)
185187 #define __NR_vhangup 58
@@ -222,10 +224,12 @@ __SC_COMP(__NR_pwritev, sys_pwritev, compat_sys_pwritev) · 36 unmodified lines
222224 __SYSCALL(__NR3264_sendfile, sys_sendfile64)
223225
224226 /* fs/select.c */
227+#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32
225228 #define __NR_pselect6 72
226229 __SC_COMP_3264(__NR_pselect6, sys_pselect6_time32, sys_pselect6, compat_sys_pselect6_time32)
227230 #define __NR_ppoll 73
228231 __SC_COMP_3264(__NR_ppoll, sys_ppoll_time32, sys_ppoll, compat_sys_ppoll_time32)
232+#endif
229233
230234 /* fs/signalfd.c */
231235 #define __NR_signalfd4 74
@@ -269,16 +273,20 @@ __SC_COMP(__NR_sync_file_range, sys_sync_file_range, \ · 37 unmodified lines
269273 /* fs/timerfd.c */
270274 #define __NR_timerfd_create 85
271275 __SYSCALL(__NR_timerfd_create, sys_timerfd_create)
276+#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32
272277 #define __NR_timerfd_settime 86
273278 __SC_3264(__NR_timerfd_settime, sys_timerfd_settime32, \
274279 sys_timerfd_settime)
275280 #define __NR_timerfd_gettime 87
276281 __SC_3264(__NR_timerfd_gettime, sys_timerfd_gettime32, \
277282 sys_timerfd_gettime)
283+#endif
278284
279285 /* fs/utimes.c */
286+#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32
280287 #define __NR_utimensat 88
281288 __SC_3264(__NR_utimensat, sys_utimensat_time32, sys_utimensat)
289+#endif
282290
283291 /* kernel/acct.c */
284292 #define __NR_acct 89
@@ -309,8 +317,10 @@ __SYSCALL(__NR_set_tid_address, sys_set_tid_address) · 24 unmodified lines
309317 __SYSCALL(__NR_unshare, sys_unshare)
310318
311319 /* kernel/futex.c */
320+#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32
312321 #define __NR_futex 98
313322 __SC_3264(__NR_futex, sys_futex_time32, sys_futex)
323+#endif
314324 #define __NR_set_robust_list 99
315325 __SC_COMP(__NR_set_robust_list, sys_set_robust_list, \
316326 compat_sys_set_robust_list)
@@ -319,8 +329,10 @@ __SC_COMP(__NR_get_robust_list, sys_get_robust_list, \ · 2 unmodified lines
319329 compat_sys_get_robust_list)
320330
321331 /* kernel/hrtimer.c */
332+#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32
322333 #define __NR_nanosleep 101
323334 __SC_3264(__NR_nanosleep, sys_nanosleep_time32, sys_nanosleep)
335+#endif
324336
325337 /* kernel/itimer.c */
326338 #define __NR_getitimer 102
@@ -341,14 +353,19 @@ __SYSCALL(__NR_delete_module, sys_delete_module) · 14 unmodified lines
341353 /* kernel/posix-timers.c */
342354 #define __NR_timer_create 107
343355 __SC_COMP(__NR_timer_create, sys_timer_create, compat_sys_timer_create)
356+#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32
344357 #define __NR_timer_gettime 108
345358 __SC_3264(__NR_timer_gettime, sys_timer_gettime32, sys_timer_gettime)
359+#endif
346360 #define __NR_timer_getoverrun 109
347361 __SYSCALL(__NR_timer_getoverrun, sys_timer_getoverrun)
362+#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32
348363 #define __NR_timer_settime 110
349364 __SC_3264(__NR_timer_settime, sys_timer_settime32, sys_timer_settime)
365+#endif
350366 #define __NR_timer_delete 111
351367 __SYSCALL(__NR_timer_delete, sys_timer_delete)
368+#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32
352369 #define __NR_clock_settime 112
353370 __SC_3264(__NR_clock_settime, sys_clock_settime32, sys_clock_settime)
354371 #define __NR_clock_gettime 113
@@ -358,6 +375,7 @@ __SC_3264(__NR_clock_getres, sys_clock_getres_time32, sys_clock_getres) · 3 unmodified lines
358375 #define __NR_clock_nanosleep 115
359376 __SC_3264(__NR_clock_nanosleep, sys_clock_nanosleep_time32, \
360377 sys_clock_nanosleep)
378+#endif
361379
362380 /* kernel/printk.c */
363381 #define __NR_syslog 116
@@ -388,9 +406,11 @@ __SYSCALL(__NR_sched_yield, sys_sched_yield) · 24 unmodified lines
388406 __SYSCALL(__NR_sched_get_priority_max, sys_sched_get_priority_max)
389407 #define __NR_sched_get_priority_min 126
390408 __SYSCALL(__NR_sched_get_priority_min, sys_sched_get_priority_min)
409+#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32
391410 #define __NR_sched_rr_get_interval 127
392411 __SC_3264(__NR_sched_rr_get_interval, sys_sched_rr_get_interval_time32, \
393412 sys_sched_rr_get_interval)
413+#endif
394414
395415 /* kernel/signal.c */
396416 #define __NR_restart_syscall 128
@@ -411,9 +431,11 @@ __SC_COMP(__NR_rt_sigaction, sys_rt_sigaction, compat_sys_rt_sigaction) · 14 unmodified lines
411431 __SC_COMP(__NR_rt_sigprocmask, sys_rt_sigprocmask, compat_sys_rt_sigprocmask)
412432 #define __NR_rt_sigpending 136
413433 __SC_COMP(__NR_rt_sigpending, sys_rt_sigpending, compat_sys_rt_sigpending)
434+#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32
414435 #define __NR_rt_sigtimedwait 137
415436 __SC_COMP_3264(__NR_rt_sigtimedwait, sys_rt_sigtimedwait_time32, \
416437 sys_rt_sigtimedwait, compat_sys_rt_sigtimedwait_time32)
438+#endif
417439 #define __NR_rt_sigqueueinfo 138
418440 __SC_COMP(__NR_rt_sigqueueinfo, sys_rt_sigqueueinfo, \
419441 compat_sys_rt_sigqueueinfo)
@@ -467,10 +489,15 @@ __SYSCALL(__NR_uname, sys_newuname) · 47 unmodified lines
467489 __SYSCALL(__NR_sethostname, sys_sethostname)
468490 #define __NR_setdomainname 162
469491 __SYSCALL(__NR_setdomainname, sys_setdomainname)
492+
493+#ifdef __ARCH_WANT_SET_GET_RLIMIT
494+/* getrlimit and setrlimit are superseded with prlimit64 */
470495 #define __NR_getrlimit 163
471496 __SC_COMP(__NR_getrlimit, sys_getrlimit, compat_sys_getrlimit)
472497 #define __NR_setrlimit 164
473498 __SC_COMP(__NR_setrlimit, sys_setrlimit, compat_sys_setrlimit)
499+#endif
500+
474501 #define __NR_getrusage 165
475502 __SC_COMP(__NR_getrusage, sys_getrusage, compat_sys_getrusage)
476503 #define __NR_umask 166
@@ -481,12 +508,14 @@ __SYSCALL(__NR_prctl, sys_prctl) · 4 unmodified lines
481508 __SYSCALL(__NR_getcpu, sys_getcpu)
482509
483510 /* kernel/time.c */
511+#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32
484512 #define __NR_gettimeofday 169
485513 __SC_COMP(__NR_gettimeofday, sys_gettimeofday, compat_sys_gettimeofday)
486514 #define __NR_settimeofday 170
487515 __SC_COMP(__NR_settimeofday, sys_settimeofday, compat_sys_settimeofday)
488516 #define __NR_adjtimex 171
489517 __SC_3264(__NR_adjtimex, sys_adjtimex_time32, sys_adjtimex)
518+#endif
490519
491520 /* kernel/timer.c */
492521 #define __NR_getpid 172
@@ -511,11 +540,13 @@ __SC_COMP(__NR_sysinfo, sys_sysinfo, compat_sys_sysinfo) · 18 unmodified lines
511540 __SC_COMP(__NR_mq_open, sys_mq_open, compat_sys_mq_open)
512541 #define __NR_mq_unlink 181
513542 __SYSCALL(__NR_mq_unlink, sys_mq_unlink)
543+#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32
514544 #define __NR_mq_timedsend 182
515545 __SC_3264(__NR_mq_timedsend, sys_mq_timedsend_time32, sys_mq_timedsend)
516546 #define __NR_mq_timedreceive 183
517547 __SC_3264(__NR_mq_timedreceive, sys_mq_timedreceive_time32, \
518548 sys_mq_timedreceive)
549+#endif
519550 #define __NR_mq_notify 184
520551 __SC_COMP(__NR_mq_notify, sys_mq_notify, compat_sys_mq_notify)
521552 #define __NR_mq_getsetattr 185
@@ -536,8 +567,10 @@ __SC_COMP(__NR_msgsnd, sys_msgsnd, compat_sys_msgsnd) · 14 unmodified lines
536567 __SYSCALL(__NR_semget, sys_semget)
537568 #define __NR_semctl 191
538569 __SC_COMP(__NR_semctl, sys_semctl, compat_sys_semctl)
570+#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32
539571 #define __NR_semtimedop 192
540572 __SC_COMP(__NR_semtimedop, sys_semtimedop, sys_semtimedop_time32)
573+#endif
541574 #define __NR_semop 193
542575 __SYSCALL(__NR_semop, sys_semop)
543576
@@ -658,8 +691,10 @@ __SC_COMP(__NR_rt_tgsigqueueinfo, sys_rt_tgsigqueueinfo, \ · 114 unmodified lines
658691 __SYSCALL(__NR_perf_event_open, sys_perf_event_open)
659692 #define __NR_accept4 242
660693 __SYSCALL(__NR_accept4, sys_accept4)
694+#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32
661695 #define __NR_recvmmsg 243
662696 __SC_COMP_3264(__NR_recvmmsg, sys_recvmmsg_time32, sys_recvmmsg, compat_sys_recvmmsg_time32)
697+#endif
663698
664699 /*
665700 * Architectures may provide up to 16 syscalls of their own
@@ -667,8 +702,10 @@ __SC_COMP_3264(__NR_recvmmsg, sys_recvmmsg_time32, sys_recvmmsg, compat_sys_recv · 1 unmodified line
667702 */
668703 #define __NR_arch_specific_syscall 244
669704
705+#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32
670706 #define __NR_wait4 260
671707 __SC_COMP(__NR_wait4, sys_wait4, compat_sys_wait4)
708+#endif
672709 #define __NR_prlimit64 261
673710 __SYSCALL(__NR_prlimit64, sys_prlimit64)
674711 #define __NR_fanotify_init 262
@@ -678,10 +715,11 @@ __SYSCALL(__NR_fanotify_mark, sys_fanotify_mark) · 3 unmodified lines
678715 #define __NR_name_to_handle_at 264
679716 __SYSCALL(__NR_name_to_handle_at, sys_name_to_handle_at)
680717 #define __NR_open_by_handle_at 265
681−__SC_COMP(__NR_open_by_handle_at, sys_open_by_handle_at, \
682− compat_sys_open_by_handle_at)
718+__SYSCALL(__NR_open_by_handle_at, sys_open_by_handle_at)
719+#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32
683720 #define __NR_clock_adjtime 266
684721 __SC_3264(__NR_clock_adjtime, sys_clock_adjtime32, sys_clock_adjtime)
722+#endif
685723 #define __NR_syncfs 267
686724 __SYSCALL(__NR_syncfs, sys_syncfs)
687725 #define __NR_setns 268
@@ -734,8 +772,10 @@ __SYSCALL(__NR_pkey_alloc, sys_pkey_alloc) · 46 unmodified lines
734772 __SYSCALL(__NR_pkey_free, sys_pkey_free)
735773 #define __NR_statx 291
736774 __SYSCALL(__NR_statx, sys_statx)
775+#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32
737776 #define __NR_io_pgetevents 292
738777 __SC_COMP_3264(__NR_io_pgetevents, sys_io_pgetevents_time32, sys_io_pgetevents, compat_sys_io_pgetevents)
778+#endif
739779 #define __NR_rseq 293
740780 __SYSCALL(__NR_rseq, sys_rseq)
741781 #define __NR_kexec_file_load 294

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t