public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 1/2] aarch64: add missing system call defines
@ 2018-10-31  6:16 Victor Kamensky
  2018-10-31  6:16 ` [PATCH 2/2] powerpc64: " Victor Kamensky
  0 siblings, 1 reply; 2+ messages in thread
From: Victor Kamensky @ 2018-10-31  6:16 UTC (permalink / raw)
  To: systemtap; +Cc: David Smith, Jafeer Uddin

A set of system call defines like __NR_alarm, __NR_ioperm,
__NR_modify_ldt, __NR_time, __NR_utime is missing in aarch64
kernel as of 4.18 kernel version.

Add corresponding definitions so system call related probes
would compile. Tested with nd_syscalls-all-probes.stp.

Signed-off-by: Victor Kamensky <kamensky@cisco.com>
---
Here is output from original error:


Running /home/root/systemtap/20181025/systemtap/testsuite/buildok/nd_syscalls-all-probes.stp
Sending "run" to stapi
run
Pass 1: parsed user script and 457 library scripts using 83972virt/69064res/2504shr/66536data kb, in 0usr/0sys/0real ms.
Pass 2: analyzed script: 993 probes, 191 functions, 102 embeds, 52 globals using 1037004virt/361076res/154868shr/1019468data kb, in 111900usr/1180sys/113049real ms.
Pass 3: translated to C into "/tmp/stap4s8PED/stap_c999d6ef96352213299084133959be00_870057_src.c" using 1037188virt/361236res/154932shr/1019652data kb, in 12260usr/20sys/12267re
al ms.
In file included from /tmp/stap4s8PED/stap_c999d6ef96352213299084133959be00_870057_src.c:35:
/tmp/stap4s8PED/stap_c999d6ef96352213299084133959be00_870057_src.c: In function 'probe_6202':
/home/root/systemtap/20181025/systemtap/runtime/linux/compat_unistd.h:1658:28: error: '__NR_alarm' undeclared (first use in this function)
 #define __NR_compat_alarm  __NR_alarm
                            ^~~~~~~~~~
/tmp/stap4s8PED/stap_c999d6ef96352213299084133959be00_870057_src.c:38449:85: note: in expansion of macro '__NR_compat_alarm'
       if ((((l->l___nr) != ((((int64_t) (/* pure */ /* unprivileged */ /* stable */ __NR_compat_alarm))))))) {
                                                                                     ^~~~~~~~~~~~~~~~~
/home/root/systemtap/20181025/systemtap/runtime/linux/compat_unistd.h:1658:28: note: each undeclared identifier is reported only once for each function it appears in
 #define __NR_compat_alarm  __NR_alarm
                            ^~~~~~~~~~
/tmp/stap4s8PED/stap_c999d6ef96352213299084133959be00_870057_src.c:38449:85: note: in expansion of macro '__NR_compat_alarm'
       if ((((l->l___nr) != ((((int64_t) (/* pure */ /* unprivileged */ /* stable */ __NR_compat_alarm))))))) {
                                                                                     ^~~~~~~~~~~~~~~~~
/tmp/stap4s8PED/stap_c999d6ef96352213299084133959be00_870057_src.c: In function 'probe_6705':
/home/root/systemtap/20181025/systemtap/runtime/linux/compat_unistd.h:1766:29: error: '__NR_ioperm' undeclared (first use in this function); did you mean '__lt_insert'?
 #define __NR_compat_ioperm  __NR_ioperm
                             ^~~~~~~~~~~
/tmp/stap4s8PED/stap_c999d6ef96352213299084133959be00_870057_src.c:59066:85: note: in expansion of macro '__NR_compat_ioperm'
       if ((((l->l___nr) != ((((int64_t) (/* pure */ /* unprivileged */ /* stable */ __NR_compat_ioperm))))))) {
                                                                                     ^~~~~~~~~~~~~~~~~~
/tmp/stap4s8PED/stap_c999d6ef96352213299084133959be00_870057_src.c: In function 'probe_6837':
/home/root/systemtap/20181025/systemtap/runtime/linux/compat_unistd.h:1801:33: error: '__NR_modify_ldt' undeclared (first use in this function)
 #define __NR_compat_modify_ldt  __NR_modify_ldt
                                 ^~~~~~~~~~~~~~~
/tmp/stap4s8PED/stap_c999d6ef96352213299084133959be00_870057_src.c:65796:85: note: in expansion of macro '__NR_compat_modify_ldt'
       if ((((l->l___nr) != ((((int64_t) (/* pure */ /* unprivileged */ /* stable */ __NR_compat_modify_ldt))))))) {
                                                                                     ^~~~~~~~~~~~~~~~~~~~~~
/tmp/stap4s8PED/stap_c999d6ef96352213299084133959be00_870057_src.c: In function 'probe_7488':
/home/root/systemtap/20181025/systemtap/runtime/linux/compat_unistd.h:1953:27: error: '__NR_time' undeclared (first use in this function); did you mean 'stp_time'?
 #define __NR_compat_time  __NR_time
                           ^~~~~~~~~
/tmp/stap4s8PED/stap_c999d6ef96352213299084133959be00_870057_src.c:93826:85: note: in expansion of macro '__NR_compat_time'
       if ((((l->l___nr) != ((((int64_t) (/* pure */ /* unprivileged */ /* stable */ __NR_compat_time))))))) {
                                                                                     ^~~~~~~~~~~~~~~~
/tmp/stap4s8PED/stap_c999d6ef96352213299084133959be00_870057_src.c: In function 'probe_7583':
/tmp/stap4s8PED/stap_c999d6ef96352213299084133959be00_870057_src.c:97104:75: error: '__NR_utime' undeclared (first use in this function); did you mean 'si_utime'?
           })) != ((((int64_t) (/* pure */ /* unprivileged */ /* stable */ __NR_utime))))))) {
                                                                           ^~~~~~~~~~
                                                                           si_utime
In file included from /tmp/stap4s8PED/stap_c999d6ef96352213299084133959be00_870057_src.c:35:
/tmp/stap4s8PED/stap_c999d6ef96352213299084133959be00_870057_src.c: In function 'probe_7660':
/home/root/systemtap/20181025/systemtap/runtime/linux/compat_unistd.h:1658:28: error: '__NR_alarm' undeclared (first use in this function)
 #define __NR_compat_alarm  __NR_alarm
                            ^~~~~~~~~~
/tmp/stap4s8PED/stap_c999d6ef96352213299084133959be00_870057_src.c:99983:85: note: in expansion of macro '__NR_compat_alarm'
       if ((((l->l___nr) != ((((int64_t) (/* pure */ /* unprivileged */ /* stable */ __NR_compat_alarm))))))) {
                                                                                     ^~~~~~~~~~~~~~~~~
/tmp/stap4s8PED/stap_c999d6ef96352213299084133959be00_870057_src.c: In function 'probe_8160':
/home/root/systemtap/20181025/systemtap/runtime/linux/compat_unistd.h:1766:29: error: '__NR_ioperm' undeclared (first use in this function); did you mean '__lt_insert'?
 #define __NR_compat_ioperm  __NR_ioperm
                             ^~~~~~~~~~~
/tmp/stap4s8PED/stap_c999d6ef96352213299084133959be00_870057_src.c:104860:85: note: in expansion of macro '__NR_compat_ioperm'
       if ((((l->l___nr) != ((((int64_t) (/* pure */ /* unprivileged */ /* stable */ __NR_compat_ioperm))))))) {
                                                                                     ^~~~~~~~~~~~~~~~~~
/tmp/stap4s8PED/stap_c999d6ef96352213299084133959be00_870057_src.c: In function 'probe_8292':
/home/root/systemtap/20181025/systemtap/runtime/linux/compat_unistd.h:1801:33: error: '__NR_modify_ldt' undeclared (first use in this function)
 #define __NR_compat_modify_ldt  __NR_modify_ldt
                                 ^~~~~~~~~~~~~~~
/tmp/stap4s8PED/stap_c999d6ef96352213299084133959be00_870057_src.c:106118:85: note: in expansion of macro '__NR_compat_modify_ldt'
       if ((((l->l___nr) != ((((int64_t) (/* pure */ /* unprivileged */ /* stable */ __NR_compat_modify_ldt))))))) {
                                                                                     ^~~~~~~~~~~~~~~~~~~~~~
/tmp/stap4s8PED/stap_c999d6ef96352213299084133959be00_870057_src.c: In function 'probe_8932':
/home/root/systemtap/20181025/systemtap/runtime/linux/compat_unistd.h:1953:27: error: '__NR_time' undeclared (first use in this function); did you mean 'stp_time'?
 #define __NR_compat_time  __NR_time
                           ^~~~~~~~~
/tmp/stap4s8PED/stap_c999d6ef96352213299084133959be00_870057_src.c:112682:85: note: in expansion of macro '__NR_compat_time'
       if ((((l->l___nr) != ((((int64_t) (/* pure */ /* unprivileged */ /* stable */ __NR_compat_time))))))) {
                                                                                     ^~~~~~~~~~~~~~~~
/tmp/stap4s8PED/stap_c999d6ef96352213299084133959be00_870057_src.c: In function 'probe_9018':
/tmp/stap4s8PED/stap_c999d6ef96352213299084133959be00_870057_src.c:113286:75: error: '__NR_utime' undeclared (first use in this function); did you mean 'si_utime'?
           })) != ((((int64_t) (/* pure */ /* unprivileged */ /* stable */ __NR_utime))))))) {
                                                                           ^~~~~~~~~~
                                                                           si_utime
make[7]: *** [scripts/Makefile.build:317: /tmp/stap4s8PED/stap_c999d6ef96352213299084133959be00_870057_src.o] Error 1
make[6]: *** [Makefile:1505: _module_/tmp/stap4s8PED] Error 2

 runtime/linux/compat_unistd.h | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/runtime/linux/compat_unistd.h b/runtime/linux/compat_unistd.h
index 07b3c5ffa..6f7e8adec 100644
--- a/runtime/linux/compat_unistd.h
+++ b/runtime/linux/compat_unistd.h
@@ -349,6 +349,21 @@
 #ifndef __NR_waitpid
 #define __NR_waitpid (__NR_syscall_max + 1)
 #endif
+#ifndef __NR_alarm
+#define __NR_alarm (__NR_syscall_max + 1)
+#endif
+#ifndef __NR_ioperm
+#define __NR_ioperm (__NR_syscall_max + 1)
+#endif
+#ifndef __NR_modify_ldt
+#define __NR_modify_ldt (__NR_syscall_max + 1)
+#endif
+#ifndef __NR_time
+#define __NR_time (__NR_syscall_max + 1)
+#endif
+#ifndef __NR_utime
+#define __NR_utime (__NR_syscall_max + 1)
+#endif
 
 #if defined(__x86_64__)
 
-- 
2.18.0

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-10-31  6:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-31  6:16 [PATCH 1/2] aarch64: add missing system call defines Victor Kamensky
2018-10-31  6:16 ` [PATCH 2/2] powerpc64: " Victor Kamensky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).