Hi Alexei,

Thank you for so quick response!

On Fri, Dec 9, 2016 at 12:37 AM, Alexei Starovoitov
<alexei.starovoi...@gmail.com> wrote:
> On Thu, Dec 8, 2016 at 8:20 AM, Ming Lei via iovisor-dev
> <iovisor-dev@lists.iovisor.org> wrote:
>> Hi,
>>
>> Bcc can be installed on ubuntu 16.04/arm64 successfully, but when
>> I try to trace, the folllowing failure[1] is triggered.
>>
>> So is bcc not ready for arm64? Or something is wrong?
>>
>> BTW, clang/llvm is 3.8, and I am happy to try any patches/tests
>> if you have ideas about the issue.
>>
>> Thanks,
>> Ming
>>                                              %w0
>> 13 warnings generated.
>> LLVM ERROR: Inline asm not supported by this streamer because we don't
>> have an asm parser for this target
>
> I suspect this is due to bcc not passing -D__ASM_SYSREG_H into clang
> like we do in samples/bpf/Makefile to workaround this issue.

Yeah, that is one problem, once I apply the following change,
vfscount.py starts working, but a new issue[1] is triggered when
'trace vfs_open' is run:

diff --git a/src/cc/frontends/clang/kbuild_helper.cc
b/src/cc/frontends/clang/kbuild_helper.cc
index 8fbefd2..77cfc39 100644
--- a/src/cc/frontends/clang/kbuild_helper.cc
+++ b/src/cc/frontends/clang/kbuild_helper.cc
@@ -84,6 +84,7 @@ int KBuildHelper::get_flags(const char
*uname_machine, vector<string> *cflags) {
   cflags->push_back("-include");
   cflags->push_back("./include/linux/kconfig.h");
   cflags->push_back("-D__KERNEL__");
+  cflags->push_back("-D__ASM_SYSREG_H");
   cflags->push_back("-D__HAVE_BUILTIN_BSWAP16__");
   cflags->push_back("-D__HAVE_BUILTIN_BSWAP32__");
   cflags->push_back("-D__HAVE_BUILTIN_BSWAP64__");


Do you have any idea about this issue?

[1] waring log
ubuntu@ubuntu:~/git/bcc/tools$ sudo ./trace.py vfs_open
In file included from /virtual/main.c:2:
In file included from include/linux/ptrace.h:5:
In file included from include/linux/sched.h:19:
In file included from include/linux/timex.h:56:
In file included from include/uapi/linux/timex.h:56:
In file included from include/linux/time.h:5:
In file included from include/linux/seqlock.h:35:
In file included from include/linux/spinlock.h:87:
In file included from ./arch/arm64/include/asm/spinlock.h:21:
In file included from ./arch/arm64/include/asm/processor.h:32:
In file included from ./arch/arm64/include/asm/alternative.h:4:
./arch/arm64/include/asm/cpufeature.h:180:53: error: use of undeclared
identifier
      'ID_AA64MMFR0_BIGENDEL_SHIFT'
        return cpuid_feature_extract_unsigned_field(mmfr0,
ID_AA64MMFR0_BIGENDEL_...
                                                           ^
./arch/arm64/include/asm/cpufeature.h:181:47: error: use of undeclared
identifier
      'ID_AA64MMFR0_BIGENDEL0_SHIFT'
                cpuid_feature_extract_unsigned_field(mmfr0,
ID_AA64MMFR0_BIGENDEL...
                                                            ^
./arch/arm64/include/asm/cpufeature.h:186:55: error: use of undeclared
identifier
      'ID_AA64PFR0_EL0_SHIFT'
        u32 val = cpuid_feature_extract_unsigned_field(pfr0,
ID_AA64PFR0_EL0_SHIFT);
                                                             ^
./arch/arm64/include/asm/cpufeature.h:188:16: error: use of undeclared
identifier
      'ID_AA64PFR0_EL0_32BIT_64BIT'
        return val == ID_AA64PFR0_EL0_32BIT_64BIT;
                      ^
./arch/arm64/include/asm/cpufeature.h:216:55: error: use of undeclared
identifier
      'SYS_ID_AA64MMFR0_EL1'
        return 
id_aa64mmfr0_mixed_endian_el0(read_system_reg(SYS_ID_AA64MMFR0_EL1));
                                                             ^
In file included from /virtual/main.c:2:
In file included from include/linux/ptrace.h:5:
In file included from include/linux/sched.h:19:
In file included from include/linux/timex.h:56:
In file included from include/uapi/linux/timex.h:56:
In file included from include/linux/time.h:5:
In file included from include/linux/seqlock.h:35:
In file included from include/linux/spinlock.h:87:
In file included from ./arch/arm64/include/asm/spinlock.h:21:
In file included from ./arch/arm64/include/asm/processor.h:34:
./arch/arm64/include/asm/hw_breakpoint.h:149:29: error: use of
undeclared identifier
      'SYS_ID_AA64DFR0_EL1'
        u64 dfr0 = read_system_reg(SYS_ID_AA64DFR0_EL1);
                                   ^
./arch/arm64/include/asm/hw_breakpoint.h:152:7: error: use of
undeclared identifier
      'ID_AA64DFR0_BRPS_SHIFT'
                                                ID_AA64DFR0_BRPS_SHIFT);
                                                ^
./arch/arm64/include/asm/hw_breakpoint.h:158:29: error: use of
undeclared identifier
      'SYS_ID_AA64DFR0_EL1'
        u64 dfr0 = read_system_reg(SYS_ID_AA64DFR0_EL1);
                                   ^
./arch/arm64/include/asm/hw_breakpoint.h:161:7: error: use of
undeclared identifier
      'ID_AA64DFR0_WRPS_SHIFT'
                                                ID_AA64DFR0_WRPS_SHIFT);
                                                ^
In file included from /virtual/main.c:2:
In file included from include/linux/ptrace.h:5:
In file included from include/linux/sched.h:19:
In file included from include/linux/timex.h:65:
In file included from ./arch/arm64/include/asm/timex.h:19:
./arch/arm64/include/asm/arch_timer.h:41:50: warning: value size does
not match register
      size specified by the constraint and modifier [-Wasm-operand-widths]
                        asm volatile("msr cntp_ctl_el0,  %0" : : "r" (val));
                                                                      ^
./arch/arm64/include/asm/arch_timer.h:41:37: note: use constraint modifier "w"
                        asm volatile("msr cntp_ctl_el0,  %0" : : "r" (val));
                                                         ^~
                                                         %w0
./arch/arm64/include/asm/arch_timer.h:44:50: warning: value size does
not match register
      size specified by the constraint and modifier [-Wasm-operand-widths]
                        asm volatile("msr cntp_tval_el0, %0" : : "r" (val));
                                                                      ^
./arch/arm64/include/asm/arch_timer.h:44:37: note: use constraint modifier "w"
                        asm volatile("msr cntp_tval_el0, %0" : : "r" (val));
                                                         ^~
                                                         %w0
./arch/arm64/include/asm/arch_timer.h:50:50: warning: value size does
not match register
      size specified by the constraint and modifier [-Wasm-operand-widths]
                        asm volatile("msr cntv_ctl_el0,  %0" : : "r" (val));
                                                                      ^
./arch/arm64/include/asm/arch_timer.h:50:37: note: use constraint modifier "w"
                        asm volatile("msr cntv_ctl_el0,  %0" : : "r" (val));
                                                         ^~
                                                         %w0
./arch/arm64/include/asm/arch_timer.h:53:50: warning: value size does
not match register
      size specified by the constraint and modifier [-Wasm-operand-widths]
                        asm volatile("msr cntv_tval_el0, %0" : : "r" (val));
                                                                      ^
./arch/arm64/include/asm/arch_timer.h:53:37: note: use constraint modifier "w"
                        asm volatile("msr cntv_tval_el0, %0" : : "r" (val));
                                                         ^~
                                                         %w0
./arch/arm64/include/asm/arch_timer.h:69:49: warning: value size does
not match register
      size specified by the constraint and modifier [-Wasm-operand-widths]
                        asm volatile("mrs %0,  cntp_ctl_el0" : "=r" (val));
                                                                     ^
./arch/arm64/include/asm/arch_timer.h:69:22: note: use constraint modifier "w"
                        asm volatile("mrs %0,  cntp_ctl_el0" : "=r" (val));
                                          ^~
                                          %w0
./arch/arm64/include/asm/arch_timer.h:72:49: warning: value size does
not match register
      size specified by the constraint and modifier [-Wasm-operand-widths]
                        asm volatile("mrs %0, cntp_tval_el0" : "=r" (val));
                                                                     ^
./arch/arm64/include/asm/arch_timer.h:72:22: note: use constraint modifier "w"
                        asm volatile("mrs %0, cntp_tval_el0" : "=r" (val));
                                          ^~
                                          %w0
./arch/arm64/include/asm/arch_timer.h:78:49: warning: value size does
not match register
      size specified by the constraint and modifier [-Wasm-operand-widths]
                        asm volatile("mrs %0,  cntv_ctl_el0" : "=r" (val));
                                                                     ^
./arch/arm64/include/asm/arch_timer.h:78:22: note: use constraint modifier "w"
                        asm volatile("mrs %0,  cntv_ctl_el0" : "=r" (val));
                                          ^~
                                          %w0
./arch/arm64/include/asm/arch_timer.h:81:49: warning: value size does
not match register
      size specified by the constraint and modifier [-Wasm-operand-widths]
                        asm volatile("mrs %0, cntv_tval_el0" : "=r" (val));
                                                                     ^
./arch/arm64/include/asm/arch_timer.h:81:22: note: use constraint modifier "w"
                        asm volatile("mrs %0, cntv_tval_el0" : "=r" (val));
                                          ^~
                                          %w0
./arch/arm64/include/asm/arch_timer.h:92:46: warning: value size does
not match register
      size specified by the constraint and modifier [-Wasm-operand-widths]
        asm volatile("mrs %0,   cntfrq_el0" : "=r" (val));
                                                    ^
./arch/arm64/include/asm/arch_timer.h:92:20: note: use constraint modifier "w"
        asm volatile("mrs %0,   cntfrq_el0" : "=r" (val));
                          ^~
                          %w0
./arch/arm64/include/asm/arch_timer.h:99:45: warning: value size does
not match register
      size specified by the constraint and modifier [-Wasm-operand-widths]
        asm volatile("mrs       %0, cntkctl_el1" : "=r" (cntkctl));
                                                         ^
./arch/arm64/include/asm/arch_timer.h:99:20: note: use constraint modifier "w"
        asm volatile("mrs       %0, cntkctl_el1" : "=r" (cntkctl));
                                ^~
                                %w0
./arch/arm64/include/asm/arch_timer.h:105:46: warning: value size does
not match register
      size specified by the constraint and modifier [-Wasm-operand-widths]
        asm volatile("msr       cntkctl_el1, %0" : : "r" (cntkctl));
                                                          ^
./arch/arm64/include/asm/arch_timer.h:105:33: note: use constraint modifier "w"
        asm volatile("msr       cntkctl_el1, %0" : : "r" (cntkctl));
                                             ^~
                                             %w0
In file included from /virtual/main.c:2:
In file included from include/linux/ptrace.h:5:
In file included from include/linux/sched.h:37:
include/linux/signal.h:88:11: warning: array index 3 is past the end
of the array
      (which contains 1 element) [-Warray-bounds]
                return (set->sig[3] | set->sig[2] |
                        ^        ~
include/uapi/asm-generic/signal.h:90:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from /virtual/main.c:2:
In file included from include/linux/ptrace.h:5:
In file included from include/linux/sched.h:37:
include/linux/signal.h:88:25: warning: array index 2 is past the end
of the array
      (which contains 1 element) [-Warray-bounds]
                return (set->sig[3] | set->sig[2] |
                                      ^        ~
include/uapi/asm-generic/signal.h:90:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from /virtual/main.c:2:
In file included from include/linux/ptrace.h:5:
In file included from include/linux/sched.h:37:
include/linux/signal.h:89:4: warning: array index 1 is past the end of the array
      (which contains 1 element) [-Warray-bounds]
                        set->sig[1] | set->sig[0]) == 0;
                        ^        ~
include/uapi/asm-generic/signal.h:90:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from /virtual/main.c:2:
In file included from include/linux/ptrace.h:5:
In file included from include/linux/sched.h:37:
include/linux/signal.h:91:11: warning: array index 1 is past the end
of the array
      (which contains 1 element) [-Warray-bounds]
                return (set->sig[1] | set->sig[0]) == 0;
                        ^        ~
include/uapi/asm-generic/signal.h:90:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from /virtual/main.c:2:
In file included from include/linux/ptrace.h:5:
In file included from include/linux/sched.h:37:
include/linux/signal.h:129:1: warning: array index 3 is past the end
of the array
      (which contains 1 element) [-Warray-bounds]
_SIG_SET_BINOP(sigorsets, _sig_or)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/signal.h:112:8: note: expanded from macro '_SIG_SET_BINOP'
                a3 = a->sig[3]; a2 = a->sig[2];                         \
                     ^      ~
include/uapi/asm-generic/signal.h:90:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from /virtual/main.c:2:
In file included from include/linux/ptrace.h:5:
In file included from include/linux/sched.h:37:
include/linux/signal.h:129:1: warning: array index 2 is past the end
of the array
      (which contains 1 element) [-Warray-bounds]
_SIG_SET_BINOP(sigorsets, _sig_or)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/signal.h:112:24: note: expanded from macro '_SIG_SET_BINOP'
                a3 = a->sig[3]; a2 = a->sig[2];                         \
                                     ^      ~
include/uapi/asm-generic/signal.h:90:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from /virtual/main.c:2:
In file included from include/linux/ptrace.h:5:
In file included from include/linux/sched.h:37:
include/linux/signal.h:129:1: warning: array index 3 is past the end
of the array
      (which contains 1 element) [-Warray-bounds]
_SIG_SET_BINOP(sigorsets, _sig_or)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/signal.h:113:8: note: expanded from macro '_SIG_SET_BINOP'
                b3 = b->sig[3]; b2 = b->sig[2];                         \
                     ^      ~
include/uapi/asm-generic/signal.h:90:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from /virtual/main.c:2:
In file included from include/linux/ptrace.h:5:
In file included from include/linux/sched.h:37:
include/linux/signal.h:129:1: warning: array index 2 is past the end
of the array
      (which contains 1 element) [-Warray-bounds]
_SIG_SET_BINOP(sigorsets, _sig_or)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/signal.h:113:24: note: expanded from macro '_SIG_SET_BINOP'
                b3 = b->sig[3]; b2 = b->sig[2];                         \
                                     ^      ~
include/uapi/asm-generic/signal.h:90:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from /virtual/main.c:2:
In file included from include/linux/ptrace.h:5:
In file included from include/linux/sched.h:37:
include/linux/signal.h:129:1: warning: array index 3 is past the end
of the array
      (which contains 1 element) [-Warray-bounds]
_SIG_SET_BINOP(sigorsets, _sig_or)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/signal.h:114:3: note: expanded from macro '_SIG_SET_BINOP'
                r->sig[3] = op(a3, b3);                                 \
                ^      ~
include/uapi/asm-generic/signal.h:90:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from /virtual/main.c:2:
In file included from include/linux/ptrace.h:5:
In file included from include/linux/sched.h:37:
include/linux/signal.h:129:1: warning: array index 2 is past the end
of the array
      (which contains 1 element) [-Warray-bounds]
_SIG_SET_BINOP(sigorsets, _sig_or)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/signal.h:115:3: note: expanded from macro '_SIG_SET_BINOP'
                r->sig[2] = op(a2, b2);                                 \
                ^      ~
include/uapi/asm-generic/signal.h:90:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from /virtual/main.c:2:
In file included from include/linux/ptrace.h:5:
In file included from include/linux/sched.h:37:
include/linux/signal.h:129:1: warning: array index 1 is past the end
of the array
      (which contains 1 element) [-Warray-bounds]
_SIG_SET_BINOP(sigorsets, _sig_or)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/signal.h:117:8: note: expanded from macro '_SIG_SET_BINOP'
                a1 = a->sig[1]; b1 = b->sig[1];                         \
                     ^      ~
include/uapi/asm-generic/signal.h:90:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from /virtual/main.c:2:
In file included from include/linux/ptrace.h:5:
In file included from include/linux/sched.h:37:
include/linux/signal.h:129:1: warning: array index 1 is past the end
of the array
      (which contains 1 element) [-Warray-bounds]
_SIG_SET_BINOP(sigorsets, _sig_or)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/signal.h:117:24: note: expanded from macro '_SIG_SET_BINOP'
                a1 = a->sig[1]; b1 = b->sig[1];                         \
                                     ^      ~
include/uapi/asm-generic/signal.h:90:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from /virtual/main.c:2:
In file included from include/linux/ptrace.h:5:
In file included from include/linux/sched.h:37:
include/linux/signal.h:129:1: warning: array index 1 is past the end
of the array
      (which contains 1 element) [-Warray-bounds]
_SIG_SET_BINOP(sigorsets, _sig_or)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/signal.h:118:3: note: expanded from macro '_SIG_SET_BINOP'
                r->sig[1] = op(a1, b1);                                 \
                ^      ~
include/uapi/asm-generic/signal.h:90:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from /virtual/main.c:2:
In file included from include/linux/ptrace.h:5:
In file included from include/linux/sched.h:37:
include/linux/signal.h:132:1: warning: array index 3 is past the end
of the array
      (which contains 1 element) [-Warray-bounds]
_SIG_SET_BINOP(sigandsets, _sig_and)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/signal.h:112:8: note: expanded from macro '_SIG_SET_BINOP'
                a3 = a->sig[3]; a2 = a->sig[2];                         \
                     ^      ~
include/uapi/asm-generic/signal.h:90:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from /virtual/main.c:2:
In file included from include/linux/ptrace.h:5:
In file included from include/linux/sched.h:37:
include/linux/signal.h:132:1: warning: array index 2 is past the end
of the array
      (which contains 1 element) [-Warray-bounds]
_SIG_SET_BINOP(sigandsets, _sig_and)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/signal.h:112:24: note: expanded from macro '_SIG_SET_BINOP'
                a3 = a->sig[3]; a2 = a->sig[2];                         \
                                     ^      ~
include/uapi/asm-generic/signal.h:90:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from /virtual/main.c:2:
In file included from include/linux/ptrace.h:5:
In file included from include/linux/sched.h:37:
include/linux/signal.h:132:1: warning: array index 3 is past the end
of the array
      (which contains 1 element) [-Warray-bounds]
_SIG_SET_BINOP(sigandsets, _sig_and)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/signal.h:113:8: note: expanded from macro '_SIG_SET_BINOP'
                b3 = b->sig[3]; b2 = b->sig[2];                         \
                     ^      ~
include/uapi/asm-generic/signal.h:90:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from /virtual/main.c:2:
In file included from include/linux/ptrace.h:5:
In file included from include/linux/sched.h:37:
include/linux/signal.h:132:1: warning: array index 2 is past the end
of the array
      (which contains 1 element) [-Warray-bounds]
_SIG_SET_BINOP(sigandsets, _sig_and)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/signal.h:113:24: note: expanded from macro '_SIG_SET_BINOP'
                b3 = b->sig[3]; b2 = b->sig[2];                         \
                                     ^      ~
include/uapi/asm-generic/signal.h:90:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from /virtual/main.c:2:
In file included from include/linux/ptrace.h:5:
In file included from include/linux/sched.h:37:
include/linux/signal.h:132:1: warning: array index 3 is past the end
of the array
      (which contains 1 element) [-Warray-bounds]
_SIG_SET_BINOP(sigandsets, _sig_and)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/signal.h:114:3: note: expanded from macro '_SIG_SET_BINOP'
                r->sig[3] = op(a3, b3);                                 \
                ^      ~
include/uapi/asm-generic/signal.h:90:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from /virtual/main.c:2:
In file included from include/linux/ptrace.h:5:
In file included from include/linux/sched.h:37:
include/linux/signal.h:132:1: warning: array index 2 is past the end
of the array
      (which contains 1 element) [-Warray-bounds]
_SIG_SET_BINOP(sigandsets, _sig_and)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/signal.h:115:3: note: expanded from macro '_SIG_SET_BINOP'
                r->sig[2] = op(a2, b2);                                 \
                ^      ~
include/uapi/asm-generic/signal.h:90:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from /virtual/main.c:2:
In file included from include/linux/ptrace.h:5:
In file included from include/linux/sched.h:37:
include/linux/signal.h:132:1: warning: array index 1 is past the end
of the array
      (which contains 1 element) [-Warray-bounds]
_SIG_SET_BINOP(sigandsets, _sig_and)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/signal.h:117:8: note: expanded from macro '_SIG_SET_BINOP'
                a1 = a->sig[1]; b1 = b->sig[1];                         \
                     ^      ~
include/uapi/asm-generic/signal.h:90:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from /virtual/main.c:2:
In file included from include/linux/ptrace.h:5:
In file included from include/linux/sched.h:37:
include/linux/signal.h:132:1: warning: array index 1 is past the end
of the array
      (which contains 1 element) [-Warray-bounds]
_SIG_SET_BINOP(sigandsets, _sig_and)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/signal.h:117:24: note: expanded from macro '_SIG_SET_BINOP'
                a1 = a->sig[1]; b1 = b->sig[1];                         \
                                     ^      ~
include/uapi/asm-generic/signal.h:90:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from /virtual/main.c:2:
In file included from include/linux/ptrace.h:5:
In file included from include/linux/sched.h:37:
include/linux/signal.h:132:1: warning: array index 1 is past the end
of the array
      (which contains 1 element) [-Warray-bounds]
_SIG_SET_BINOP(sigandsets, _sig_and)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/signal.h:118:3: note: expanded from macro '_SIG_SET_BINOP'
                r->sig[1] = op(a1, b1);                                 \
                ^      ~
include/uapi/asm-generic/signal.h:90:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from /virtual/main.c:2:
In file included from include/linux/ptrace.h:5:
In file included from include/linux/sched.h:37:
include/linux/signal.h:135:1: warning: array index 3 is past the end
of the array
      (which contains 1 element) [-Warray-bounds]
_SIG_SET_BINOP(sigandnsets, _sig_andn)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/signal.h:112:8: note: expanded from macro '_SIG_SET_BINOP'
                a3 = a->sig[3]; a2 = a->sig[2];                         \
                     ^      ~
include/uapi/asm-generic/signal.h:90:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from /virtual/main.c:2:
In file included from include/linux/ptrace.h:5:
In file included from include/linux/sched.h:37:
include/linux/signal.h:135:1: warning: array index 2 is past the end
of the array
      (which contains 1 element) [-Warray-bounds]
_SIG_SET_BINOP(sigandnsets, _sig_andn)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/signal.h:112:24: note: expanded from macro '_SIG_SET_BINOP'
                a3 = a->sig[3]; a2 = a->sig[2];                         \
                                     ^      ~
include/uapi/asm-generic/signal.h:90:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from /virtual/main.c:2:
In file included from include/linux/ptrace.h:5:
In file included from include/linux/sched.h:37:
include/linux/signal.h:135:1: warning: array index 3 is past the end
of the array
      (which contains 1 element) [-Warray-bounds]
_SIG_SET_BINOP(sigandnsets, _sig_andn)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/signal.h:113:8: note: expanded from macro '_SIG_SET_BINOP'
                b3 = b->sig[3]; b2 = b->sig[2];                         \
                     ^      ~
include/uapi/asm-generic/signal.h:90:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from /virtual/main.c:2:
In file included from include/linux/ptrace.h:5:
In file included from include/linux/sched.h:37:
include/linux/signal.h:135:1: warning: array index 2 is past the end
of the array
      (which contains 1 element) [-Warray-bounds]
_SIG_SET_BINOP(sigandnsets, _sig_andn)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/signal.h:113:24: note: expanded from macro '_SIG_SET_BINOP'
                b3 = b->sig[3]; b2 = b->sig[2];                         \
                                     ^      ~
include/uapi/asm-generic/signal.h:90:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from /virtual/main.c:2:
In file included from include/linux/ptrace.h:5:
In file included from include/linux/sched.h:37:
include/linux/signal.h:135:1: warning: array index 3 is past the end
of the array
      (which contains 1 element) [-Warray-bounds]
_SIG_SET_BINOP(sigandnsets, _sig_andn)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/signal.h:114:3: note: expanded from macro '_SIG_SET_BINOP'
                r->sig[3] = op(a3, b3);                                 \
                ^      ~
include/uapi/asm-generic/signal.h:90:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from /virtual/main.c:2:
In file included from include/linux/ptrace.h:5:
In file included from include/linux/sched.h:37:
include/linux/signal.h:135:1: warning: array index 2 is past the end
of the array
      (which contains 1 element) [-Warray-bounds]
_SIG_SET_BINOP(sigandnsets, _sig_andn)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/signal.h:115:3: note: expanded from macro '_SIG_SET_BINOP'
                r->sig[2] = op(a2, b2);                                 \
                ^      ~
include/uapi/asm-generic/signal.h:90:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from /virtual/main.c:2:
In file included from include/linux/ptrace.h:5:
In file included from include/linux/sched.h:37:
include/linux/signal.h:135:1: warning: array index 1 is past the end
of the array
      (which contains 1 element) [-Warray-bounds]
_SIG_SET_BINOP(sigandnsets, _sig_andn)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/signal.h:117:8: note: expanded from macro '_SIG_SET_BINOP'
                a1 = a->sig[1]; b1 = b->sig[1];                         \
                     ^      ~
include/uapi/asm-generic/signal.h:90:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from /virtual/main.c:2:
In file included from include/linux/ptrace.h:5:
In file included from include/linux/sched.h:37:
include/linux/signal.h:135:1: warning: array index 1 is past the end
of the array
      (which contains 1 element) [-Warray-bounds]
_SIG_SET_BINOP(sigandnsets, _sig_andn)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/signal.h:117:24: note: expanded from macro '_SIG_SET_BINOP'
                a1 = a->sig[1]; b1 = b->sig[1];                         \
                                     ^      ~
include/uapi/asm-generic/signal.h:90:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from /virtual/main.c:2:
In file included from include/linux/ptrace.h:5:
In file included from include/linux/sched.h:37:
include/linux/signal.h:135:1: warning: array index 1 is past the end
of the array
      (which contains 1 element) [-Warray-bounds]
_SIG_SET_BINOP(sigandnsets, _sig_andn)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/signal.h:118:3: note: expanded from macro '_SIG_SET_BINOP'
                r->sig[1] = op(a1, b1);                                 \
                ^      ~
include/uapi/asm-generic/signal.h:90:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from /virtual/main.c:2:
In file included from include/linux/ptrace.h:5:
In file included from include/linux/sched.h:37:
include/linux/signal.h:157:1: warning: array index 3 is past the end
of the array
      (which contains 1 element) [-Warray-bounds]
_SIG_SET_OP(signotset, _sig_not)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/signal.h:146:27: note: expanded from macro '_SIG_SET_OP'
        case 4: set->sig[3] = op(set->sig[3]);                          \
                                 ^        ~
include/linux/signal.h:156:24: note: expanded from macro '_sig_not'
#define _sig_not(x)     (~(x))
                           ^
include/uapi/asm-generic/signal.h:90:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from /virtual/main.c:2:
In file included from include/linux/ptrace.h:5:
In file included from include/linux/sched.h:37:
include/linux/signal.h:157:1: warning: array index 3 is past the end
of the array
      (which contains 1 element) [-Warray-bounds]
_SIG_SET_OP(signotset, _sig_not)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/signal.h:146:10: note: expanded from macro '_SIG_SET_OP'
        case 4: set->sig[3] = op(set->sig[3]);                          \
                ^        ~
include/uapi/asm-generic/signal.h:90:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from /virtual/main.c:2:
In file included from include/linux/ptrace.h:5:
In file included from include/linux/sched.h:37:
include/linux/signal.h:157:1: warning: array index 2 is past the end
of the array
      (which contains 1 element) [-Warray-bounds]
_SIG_SET_OP(signotset, _sig_not)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/signal.h:147:20: note: expanded from macro '_SIG_SET_OP'
                set->sig[2] = op(set->sig[2]);                          \
                                 ^        ~
include/linux/signal.h:156:24: note: expanded from macro '_sig_not'
#define _sig_not(x)     (~(x))
                           ^
include/uapi/asm-generic/signal.h:90:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from /virtual/main.c:2:
In file included from include/linux/ptrace.h:5:
In file included from include/linux/sched.h:37:
include/linux/signal.h:157:1: warning: array index 2 is past the end
of the array
      (which contains 1 element) [-Warray-bounds]
_SIG_SET_OP(signotset, _sig_not)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/signal.h:147:3: note: expanded from macro '_SIG_SET_OP'
                set->sig[2] = op(set->sig[2]);                          \
                ^        ~
include/uapi/asm-generic/signal.h:90:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from /virtual/main.c:2:
In file included from include/linux/ptrace.h:5:
In file included from include/linux/sched.h:37:
include/linux/signal.h:157:1: warning: array index 1 is past the end
of the array
      (which contains 1 element) [-Warray-bounds]
_SIG_SET_OP(signotset, _sig_not)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/signal.h:148:27: note: expanded from macro '_SIG_SET_OP'
        case 2: set->sig[1] = op(set->sig[1]);                          \
                                 ^        ~
include/linux/signal.h:156:24: note: expanded from macro '_sig_not'
#define _sig_not(x)     (~(x))
                           ^
include/uapi/asm-generic/signal.h:90:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from /virtual/main.c:2:
In file included from include/linux/ptrace.h:5:
In file included from include/linux/sched.h:37:
include/linux/signal.h:157:1: warning: array index 1 is past the end
of the array
      (which contains 1 element) [-Warray-bounds]
_SIG_SET_OP(signotset, _sig_not)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/signal.h:148:10: note: expanded from macro '_SIG_SET_OP'
        case 2: set->sig[1] = op(set->sig[1]);                          \
                ^        ~
include/uapi/asm-generic/signal.h:90:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from /virtual/main.c:2:
In file included from include/linux/ptrace.h:5:
In file included from include/linux/sched.h:37:
include/linux/signal.h:168:10: warning: array index 1 is past the end
of the array
      (which contains 1 element) [-Warray-bounds]
        case 2: set->sig[1] = 0;
                ^        ~
include/uapi/asm-generic/signal.h:90:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from /virtual/main.c:2:
In file included from include/linux/ptrace.h:5:
In file included from include/linux/sched.h:37:
include/linux/signal.h:180:10: warning: array index 1 is past the end
of the array
      (which contains 1 element) [-Warray-bounds]
        case 2: set->sig[1] = -1;
                ^        ~
include/uapi/asm-generic/signal.h:90:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from /virtual/main.c:2:
In file included from include/linux/ptrace.h:5:
In file included from include/linux/sched.h:37:
include/linux/signal.h:210:10: warning: array index 1 is past the end
of the array
      (which contains 1 element) [-Warray-bounds]
        case 2: set->sig[1] = 0;
                ^        ~
include/uapi/asm-generic/signal.h:90:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from /virtual/main.c:2:
In file included from include/linux/ptrace.h:5:
In file included from include/linux/sched.h:37:
include/linux/signal.h:222:10: warning: array index 1 is past the end
of the array
      (which contains 1 element) [-Warray-bounds]
        case 2: set->sig[1] = -1;
                ^        ~
include/uapi/asm-generic/signal.h:90:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from /virtual/main.c:5:
include/linux/fs.h:2691:9: warning: comparison of unsigned enum
expression < 0 is always
      false [-Wtautological-compare]
        if (id < 0 || id >= READING_MAX_ID)
            ~~ ^ ~
53 warnings and 9 errors generated.
Failed to compile BPF module


-- 
Ming Lei
_______________________________________________
iovisor-dev mailing list
iovisor-dev@lists.iovisor.org
https://lists.iovisor.org/mailman/listinfo/iovisor-dev

Reply via email to