From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 113006 invoked by alias); 31 Oct 2018 06:16:13 -0000 Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org Received: (qmail 112150 invoked by uid 89); 31 Oct 2018 06:16:04 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.1 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,KAM_LOTSOFHASH,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: alln-iport-7.cisco.com Received: from alln-iport-7.cisco.com (HELO alln-iport-7.cisco.com) (173.37.142.94) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 31 Oct 2018 06:16:01 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=9249; q=dns/txt; s=iport; t=1540966561; x=1542176161; h=from:to:cc:subject:date:message-id; bh=at/BgnMRENEAoLB9PPc16cW/4YvmUZB43urFYjSEQGY=; b=P+LhGlT7H6zleA7smZN/qD4LciJ7/aF/epgIJsxEtXKulOGvL2mgDmK1 JQ1MIyTsncE7xKcnjVrcm8RUpivx2IL7SQqhQ8vR2sLcS1F1c0mxovrLW /HRz94HPfNB1bEkyxYoVvk3bjsVZeUobybkiNIgVdfFxor2KKDTSoggEu Q=; Received: from rcdn-core-9.cisco.com ([173.37.93.145]) by alln-iport-7.cisco.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 31 Oct 2018 06:15:59 +0000 Received: from kamensky-w541.cisco.com ([10.24.82.179]) (authenticated bits=0) by rcdn-core-9.cisco.com (8.15.2/8.15.2) with ESMTPSA id w9V6FIod022726 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 31 Oct 2018 06:15:58 GMT From: Victor Kamensky To: systemtap@sourceware.org Cc: David Smith , Jafeer Uddin Subject: [PATCH 1/2] aarch64: add missing system call defines Date: Wed, 31 Oct 2018 06:16:00 -0000 Message-Id: <20181031061516.19788-1-kamensky@cisco.com> X-Outbound-SMTP-Client: 10.24.82.179, [10.24.82.179] X-Outbound-Node: rcdn-core-9.cisco.com X-IsSubscribed: yes X-SW-Source: 2018-q4/txt/msg00066.txt.bz2 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 --- 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