syscalls/aarch64: Remove 32 bit only syscalls
PATCH 1/1 syscalls/aarch64: Remove 32 bit only syscalls
From: Joerg Vehlow <[email protected]>
These syscalls are not available in 64 bit builds of linux.
See: <linux>/include/uapi/asm-generic/unistd.h
With the syscall defined, the test clock_gettim04 fails with ../../../../include/tst_timer.h:216: TCONF: syscall(403) __NR_clock_gettime64 not supported
---
I am not 100% sure, how the syscall table for aarch64 is generated. There are also compat version for some of the 32 bit only 64 bit syscalls, but I think they are only available, when running an 32 bit arm application.
include/lapi/syscalls/aarch64.in | 20 -------------------- 1 file changed, 20 deletions(-)
include/lapi/syscalls/aarch64.in +0 -20
@@ -278,26 +278,6 @@ statx 291 io_pgetevents 292 rseq 293 kexec_file_load 294 -clock_gettime64 403 -clock_settime64 404 -clock_adjtime64 405 -clock_getres_time64 406 -clock_nanosleep_time64 407 -timer_gettime64 408 -timer_settime64 409 -timerfd_gettime64 410 -timerfd_settime64 411 -utimensat_time64 412 -pselect6_time64 413 -ppoll_time64 414 -io_pgetevents_time64 416 -recvmmsg_time64 417 -mq_timedsend_time64 418 -mq_timedreceive_time64 419 -semtimedop_time64 420 -rt_sigtimedwait_time64 421 -futex_time64 422 -sched_rr_get_interval_time64 423 pidfd_send_signal 424 io_uring_setup 425 io_uring_enter 426
Signature · 1 line
2.25.1
PATCH 1/1 syscalls/aarch64: Remove 32 bit only syscalls
+Arnd
Quoted 52 lines · Joerg Vehlow
From: Joerg Vehlow <[email protected]>
These syscalls are not available in 64 bit builds of linux.
See: <linux>/include/uapi/asm-generic/unistd.hWith the syscall defined, the test
clock_gettim04fails with../../../../include/tst_timer.h:216: TCONF: syscall(403)__NR_clock_gettime64not supportedFixes 59d278d61ed90117607f389326e0816a14dbf53c ("lapi/syscalls: Update syscall numbers")Signed-off-by Joerg Vehlow <[email protected]>---
I am not 100% sure, how the syscall table for aarch64 is generated. There are also compat version for some of the 32 bit only 64 bit syscalls, but I think they are only available, when running an 32 bit arm application.
include/lapi/syscalls/aarch64.in | 20 -------------------- 1 file changed, 20 deletions(-)include/lapi/syscalls/aarch64.in +0
-20@@ -278,26 +278,6 @@ statx 291 io_pgetevents 292 rseq 293 kexec_file_load 294 -clock_gettime64 403 -clock_settime64 404 -clock_adjtime64 405 -clock_getres_time64 406 -clock_nanosleep_time64 407 -timer_gettime64 408 -timer_settime64 409 -timerfd_gettime64 410 -timerfd_settime64 411 -utimensat_time64 412 -pselect6_time64 413 -ppoll_time64 414 -io_pgetevents_time64 416 -recvmmsg_time64 417 -mq_timedsend_time64 418 -mq_timedreceive_time64 419 -semtimedop_time64 420 -rt_sigtimedwait_time64 421 -futex_time64 422 -sched_rr_get_interval_time64 423 pidfd_send_signal 424 io_uring_setup 425 io_uring_enter 426Signature · 1 line
2.25.1
Signature · 1 line
viresh
PATCH 1/1 syscalls/aarch64: Remove 32 bit only syscalls
Quoted 19 lines · Viresh Kumar
+Arnd
Quoted 15 lines · Joerg Vehlow
From: Joerg Vehlow <[email protected]>
These syscalls are not available in 64 bit builds of linux.
See: <linux>/include/uapi/asm-generic/unistd.hWith the syscall defined, the test
clock_gettim04fails with../../../../include/tst_timer.h:216: TCONF: syscall(403)__NR_clock_gettime64not supportedFixes 59d278d61ed90117607f389326e0816a14dbf53c ("lapi/syscalls: Update syscall numbers")Signed-off-by Joerg Vehlow <[email protected]>---
I am not 100% sure, how the syscall table for aarch64 is generated. There are also compat version for some of the 32 bit only 64 bit syscalls, but I think they are only available, when running an 32 bit arm application.
The syscall table for aarch64 is generated from the kernel's include/uapi/asm-generic/unistd.h, which has a number of #ifdefs in it. A lot of these are disabled on aarch64 since they refer to older or 32-bit-only calls.
https://marcin.juszkiewicz.com.pl/download/tables/syscalls.html has a table with the correct set of syscalls for each architecture, and scripts to generate them from both the old asm-generic/unistd.h method (now only still used on modern architectures) and the newer syscall.tbl format (used on older architectures)
It would be good to finally convert asm-generic/unistd.h to the new format in order to automatically generate tables like the one used by ltp. In the meantime, please double-check all architectures against Marcin's tables. The same problem likely also exists elsewhere, e.g. for rv64.
Arnd
PATCH 1/1 syscalls/aarch64: Remove 32 bit only syscalls
Hi Arnd,
Quoted 9 lines · Arnd Bergmann
Quoted 4 lines
Quoted 4 lines
I am not 100% sure, how the syscall table for aarch64 is generated. There are also compat version for some of the 32 bit only 64 bit syscalls, but I think they are only available, when running an 32 bit arm application.
The syscall table for aarch64 is generated from the kernel's
include/uapi/asm-generic/unistd.h, which has a number of #ifdefs in it. A lot of these are disabled on aarch64 since they refer to older or 32-bit-only calls.
Quoted 5 lines
https://marcin.juszkiewicz.com.pl/download/tables/syscalls.html has a table with the correct set of syscalls for each architecture, and scripts to generate them from both the old
asm-generic/unistd.hmethod (now only still used on modern architectures) and the newer syscall.tbl format (used on older architectures)
Thanks for this explanation, I already found this site, but wasn't sure if it is "correct".
Quoted 5 lines
It would be good to finally convert
asm-generic/unistd.hto the new format in order to automatically generate tables like the one used by ltp. In the meantime, please double-check all architectures against Marcin's tables. The same problem likely also exists elsewhere, e.g. for rv64.
@all
After Arnd's explanation, I guess this patch is correct and can be merged? Other architectures and the remaining syscalls should be checked as well. Maybe we can integrate Marcin's tool for extraction into ltp?
See: https://github.com/hrw/syscalls-table
Joerg
PATCH 1/1 syscalls/aarch64: Remove 32 bit only syscalls
Hi all,
Quoted 17 lines
Hi Arnd,
Quoted 13 lines · Arnd Bergmann
Quoted 3 lines
Quoted 3 lines
I am not 100% sure, how the syscall table for aarch64 is generated. There are also compat version for some of the 32 bit only 64 bit syscalls, but I think they are only available, when running an 32 bit arm application.
The syscall table for aarch64 is generated from the kernel's
include/uapi/asm-generic/unistd.h, which has a number of #ifdefs in it. A lot of these are disabled on aarch64 since they refer to older or 32-bit-only calls.https://marcin.juszkiewicz.com.pl/download/tables/syscalls.html has a table with the correct set of syscalls for each architecture, and scripts to generate them from both the old
asm-generic/unistd.hmethod (now only still used on modern architectures) and the newer syscall.tbl format (used on older architectures)
@Arnd: thanks a lot for this table and explanations! I would not expect this kind of error in kernel sources.
When I changed / reviewed syscall numbers for LTP, I usually compared with kernel and musl sources. I never noticed change, but now I see for clock_gettime64 it's in musl only for arm (arch/arm/bits/syscall.h.in), but in kernel it's not only for arm, but also for arm64:
arm64/include/asm/unistd.h:30:#define __NR_compat_clock_gettime64 403
Similarly timerfd_settime64 is for musl only for arm, in kernel for both.
All syscalls are *time64, that explains why they are only for 32bit.
Quoted 8 lines
Thanks for this explanation, I already found this site, but wasn't sure if it is "correct".
Quoted 4 lines
It would be good to finally convert
asm-generic/unistd.hto the new format in order to automatically generate tables like the one used by ltp. In the meantime, please double-check all architectures against Marcin's tables. The same problem likely also exists elsewhere, e.g. for rv64.
Quoted 5 lines
@all
After Arnd's explanation, I guess this patch is correct and can be merged? Other architectures and the remaining syscalls should be checked as well. Maybe we can integrate Marcin's tool for extraction into ltp?
See: https://github.com/hrw/syscalls-table
Sure.
Kind regards,
Petr
Quoted 1 line
Joerg
PATCH 1/1 syscalls/aarch64: Remove 32 bit only syscalls
Quoted 15 lines · Petr Vorel
Hi all,
Quoted 11 lines
Hi Arnd,
Quoted 7 lines · Arnd Bergmann
Quoted 3 lines
Quoted 3 lines
I am not 100% sure, how the syscall table for aarch64 is generated. There are also compat version for some of the 32 bit only 64 bit syscalls, but I think they are only available, when running an 32 bit arm application.
The syscall table for aarch64 is generated from the kernel's
include/uapi/asm-generic/unistd.h, which has a number of #ifdefs in it. A lot of these are disabled on aarch64 since they refer to older or 32-bit-only calls.
Quoted 7 lines
Quoted 5 lines
Quoted 5 lines
https://marcin.juszkiewicz.com.pl/download/tables/syscalls.html has a table with the correct set of syscalls for each architecture, and scripts to generate them from both the old
asm-generic/unistd.hmethod (now only still used on modern architectures) and the newer syscall.tbl format (used on older architectures)@Arnd: thanks a lot for this table and explanations! I would not expect this kind of error in kernel sources.
I don't see anything wrong in the kernel sources here, just a little misleading when read by a human rather than a compiler.
Quoted 5 lines
When I changed / reviewed syscall numbers for LTP, I usually compared with kernel and musl sources. I never noticed change, but now I see for
clock_gettime64it's in musl only for arm (arch/arm/bits/syscall.h.in), but in kernel it's not only for arm, but also for arm64:
arm64/include/asm/unistd.h:30:#define__NR_compat_clock_gettime64403
This is a kernel-internal definition that is used to build the 32-bit VDSO. The file is not made available to user space applications.
The file you need to look at for arm64 is include/uapi/asm-generic/unistd.h. As I said, that file has a lot of #ifdefs and other magic in it, but I suppose we could come up with a script to process it with /usr/bin/unifdef to only get the parts you are interested in. Ideally though we would just convert it into the modern machine-readable syscall.tbl format.
Arnd
PATCH 1/1 syscalls/aarch64: Remove 32 bit only syscalls
Quoted 27 lines · Petr Vorel
Quoted 15 lines
Hi all,
Quoted 11 lines
Hi Arnd,
Quoted 7 lines · Arnd Bergmann
Quoted 3 lines
Quoted 3 lines
I am not 100% sure, how the syscall table for aarch64 is generated. There are also compat version for some of the 32 bit only 64 bit syscalls, but I think they are only available, when running an 32 bit arm application.
The syscall table for aarch64 is generated from the kernel's
include/uapi/asm-generic/unistd.h, which has a number of #ifdefs in it. A lot of these are disabled on aarch64 since they refer to older or 32-bit-only calls.Quoted 7 lines
Quoted 5 lines
Quoted 5 lines
https://marcin.juszkiewicz.com.pl/download/tables/syscalls.html has a table with the correct set of syscalls for each architecture, and scripts to generate them from both the old
asm-generic/unistd.hmethod (now only still used on modern architectures) and the newer syscall.tbl format (used on older architectures)@Arnd: thanks a lot for this table and explanations! I would not expect this kind of error in kernel sources.
I don't see anything wrong in the kernel sources here, just a little misleading when read by a human rather than a compiler.
Quoted 8 lines
Quoted 5 lines
When I changed / reviewed syscall numbers for LTP, I usually compared with kernel and musl sources. I never noticed change, but now I see for
clock_gettime64it's in musl only for arm (arch/arm/bits/syscall.h.in), but in kernel it's not only for arm, but also for arm64:
arm64/include/asm/unistd.h:30:#define__NR_compat_clock_gettime64403This is a kernel-internal definition that is used to build the 32-bit VDSO. The file is not made available to user space applications.
Thanks for info!
Quoted 5 lines
The file you need to look at for arm64 is
include/uapi/asm-generic/unistd.h. As I said, that file has a lot of #ifdefs and other magic in it, but I suppose we could come up with a script to process it with/usr/bin/unifdefto only get the parts you are interested in. Ideally though we would just convert it into the modern machine-readable syscall.tbl format.
+1
Kind regards,
Petr
Quoted 1 line
Arnd