Skip to content

Instantly share code, notes, and snippets.

@hassan113
Created June 8, 2020 06:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hassan113/6b7fe299092fc7025085720ec4d6ebf9 to your computer and use it in GitHub Desktop.
Save hassan113/6b7fe299092fc7025085720ec4d6ebf9 to your computer and use it in GitHub Desktop.
sudo stap -gv -a arm64 -p4 -r /home/hassan/Desktop/sandbox_design/arm64/output/build/linux-5.6.15/ -B CROSS_COMPILE=/home/hassan/Desktop/sandbox_design/arm64/output/host/bin/aarch64-linux- -m strace.ko strace.stp -v
...
...
...
..
Running env -uARCH -uKBUILD_EXTMOD -uCROSS_COMPILE -uKBUILD_IMAGE -uKCONFIG_CONFIG -uINSTALL_PATH -uLD_LIBRARY_PATH PATH=/usr/bin:/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin make -C /home/hassan/Desktop/sandbox_design/arm64/output/build/linux-5.6.15/ M=/tmp/stap5sgSgs modules CONFIG_DEBUG_INFO= CONFIG_STACK_VALIDATION= ARCH=arm64 CROSS_COMPILE=/home/hassan/Desktop/sandbox_design/arm64/output/host/bin/aarch64-linux- --no-print-directory -j9
CC [M] /tmp/stap5sgSgs/strace_aux_0.o
CC [M] /tmp/stap5sgSgs/strace_src.o
CC [M] /tmp/stap5sgSgs/strace_aux_1.o
In file included from /tmp/stap5sgSgs/strace_src.c:36:
/usr/local/share/systemtap/runtime/linux/compat_unistd.h:1876: error: "__NR_compat_clock_getres" redefined [-Werror]
#define __NR_compat_clock_getres __NR_clock_getres
In file included from /tmp/stap5sgSgs/strace_src.c:35:
./arch/arm64/include/asm/unistd.h:29: note: this is the location of the previous definition
#define __NR_compat_clock_getres 264
In file included from /tmp/stap5sgSgs/strace_src.c:36:
/usr/local/share/systemtap/runtime/linux/compat_unistd.h:1877: error: "__NR_compat_clock_gettime" redefined [-Werror]
#define __NR_compat_clock_gettime __NR_clock_gettime
In file included from /tmp/stap5sgSgs/strace_src.c:35:
./arch/arm64/include/asm/unistd.h:28: note: this is the location of the previous definition
#define __NR_compat_clock_gettime 263
In file included from /tmp/stap5sgSgs/strace_src.c:36:
/usr/local/share/systemtap/runtime/linux/compat_unistd.h:1958: error: "__NR_compat_gettimeofday" redefined [-Werror]
#define __NR_compat_gettimeofday __NR_gettimeofday
In file included from /tmp/stap5sgSgs/strace_src.c:35:
./arch/arm64/include/asm/unistd.h:25: note: this is the location of the previous definition
#define __NR_compat_gettimeofday 78
/tmp/stap5sgSgs/strace_src.c: In function ‘function___global__struct_compat_itimerspec_u__overload_0’:
/tmp/stap5sgSgs/strace_src.c:207680:27: error: storage size of ‘its’ isn’t known
struct compat_itimerspec its;
^~~
/tmp/stap5sgSgs/strace_src.c: In function ‘function___global__struct_compat_itimerval_u__overload_0’:
/tmp/stap5sgSgs/strace_src.c:207742:26: error: storage size of ‘itv’ isn’t known
struct compat_itimerval itv;
^~~
/tmp/stap5sgSgs/strace_src.c:207748:50: error: invalid application of ‘sizeof’ to incomplete type ‘struct compat_itimerval’
if(_stp_copy_from_user((char *)&itv,ptr,sizeof(struct compat_itimerval)))
^~~~~~
/tmp/stap5sgSgs/strace_src.c: In function ‘function___global__struct_compat_timespec_u__overload_0’:
/tmp/stap5sgSgs/strace_src.c:207805:32: error: array type has incomplete element type ‘struct compat_timespec’
struct compat_timespec ts[2]; /* maximum, enforced below */
^~
/tmp/stap5sgSgs/strace_src.c:207812:16: error: invalid application of ‘sizeof’ to incomplete type ‘struct compat_timespec’
n*sizeof(struct compat_timespec))) {
^~~~~~
/tmp/stap5sgSgs/strace_src.c: In function ‘function___global__struct_compat_timeval_u__overload_0’:
/tmp/stap5sgSgs/strace_src.c:207889:31: error: array type has incomplete element type ‘struct compat_timeval’
struct compat_timeval tv[2]; /* maximum enforced below */
^~
/tmp/stap5sgSgs/strace_src.c:207896:15: error: invalid application of ‘sizeof’ to incomplete type ‘struct compat_timeval’
n*sizeof(struct compat_timeval)) == 0) {
^~~~~~
/tmp/stap5sgSgs/strace_src.c: In function ‘function___global__struct_compat_timex_u__overload_0’:
/tmp/stap5sgSgs/strace_src.c:207959:22: error: storage size of ‘ts’ isn’t known
struct compat_timex ts;
^~
/tmp/stap5sgSgs/strace_src.c:207967:14: error: invalid application of ‘sizeof’ to incomplete type ‘struct compat_timex’
sizeof(struct compat_timex)) == 0)
^~~~~~
/tmp/stap5sgSgs/strace_src.c: In function ‘function___global__struct_itimerspec_u__overload_0’:
/tmp/stap5sgSgs/strace_src.c:208274:20: error: storage size of ‘its’ isn’t known
struct itimerspec its;
^~~
/tmp/stap5sgSgs/strace_src.c:208280:51: error: invalid application of ‘sizeof’ to incomplete type ‘struct itimerspec’
if(_stp_copy_from_user((char *)&its, ptr,sizeof(struct itimerspec)))
^~~~~~
/tmp/stap5sgSgs/strace_src.c: In function ‘function___global__struct_itimerval_u__overload_0’:
/tmp/stap5sgSgs/strace_src.c:208331:19: error: storage size of ‘itv’ isn’t known
struct itimerval itv;
^~~
/tmp/stap5sgSgs/strace_src.c:208337:50: error: invalid application of ‘sizeof’ to incomplete type ‘struct itimerval’
if(_stp_copy_from_user((char *)&itv,ptr,sizeof(struct itimerval)))
^~~~~~
/tmp/stap5sgSgs/strace_src.c: In function ‘function___global__struct_timespec_u__overload_0’:
/tmp/stap5sgSgs/strace_src.c:208874:25: error: array type has incomplete element type ‘struct timespec’
struct timespec ts[2]; /* maximum enforced below */
^~
/tmp/stap5sgSgs/strace_src.c:208881:16: error: invalid application of ‘sizeof’ to incomplete type ‘struct timespec’
n*sizeof(struct timespec))) {
^~~~~~
/tmp/stap5sgSgs/strace_src.c: In function ‘function___global__struct_timeval_u__overload_0’:
/tmp/stap5sgSgs/strace_src.c:208956:17: error: array type has incomplete element type ‘struct timeval’
struct timeval tv[2]; /* maximum enforced below */
^~
/tmp/stap5sgSgs/strace_src.c:208963:15: error: invalid application of ‘sizeof’ to incomplete type ‘struct timeval’
n*sizeof(struct timeval)) == 0) {
^~~~~~
/tmp/stap5sgSgs/strace_src.c: In function ‘function___global__struct_timex_u__overload_0’:
/tmp/stap5sgSgs/strace_src.c:209022:15: error: storage size of ‘ts’ isn’t known
struct timex ts;
^~
/tmp/stap5sgSgs/strace_src.c:209030:14: error: invalid application of ‘sizeof’ to incomplete type ‘struct timex’
sizeof(struct timex)) == 0)
^~~~~~
/tmp/stap5sgSgs/strace_src.c: In function ‘function___global_ctime__overload_0’:
/tmp/stap5sgSgs/strace_src.c:209788:5: error: unknown type name ‘time_t’; did you mean ‘ktime_t’?
time_t lcltime;
^~~~~~
ktime_t
cc1: all warnings being treated as errors
scripts/Makefile.build:267: recipe for target '/tmp/stap5sgSgs/strace_src.o' failed
make[1]: *** [/tmp/stap5sgSgs/strace_src.o] Error 1
Makefile:1695: recipe for target '/tmp/stap5sgSgs' failed
make: *** [/tmp/stap5sgSgs] Error 2
Spawn waitpid result (0x200): 2
WARNING: kbuild exited with status: 2
Pass 4: compiled C into "strace.ko" in 28720usr/1540sys/29696real ms.
Pass 4: compilation failed. [man error::pass4]
Running rm -rf /tmp/stap5sgSgs
Spawn waitpid result (0x0): 0
Removed temporary directory "/tmp/stap5sgSgs"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment