On 7/1/19 4:54 AM, Paolo Pisati wrote: > Full failure message: > > ... > #13/p valid read map access into a read-only array 2 FAIL retval 65507 != -29 > verification time 14 usec > stack depth 8 > processed 14 insns (limit 1000000) max_states_per_insn 0 total_states 2 > peak_states 2 mark_read 1 > ... > > this on 5.2-rc6, arm64 defconfig + CONFIG_BPF* enabled (full config here [1]). > Any idea what could be wrong? Below is the test case. { "valid read map access into a read-only array 2", .insns = { BPF_ST_MEM(BPF_DW, BPF_REG_10, -8, 0), BPF_MOV64_REG(BPF_REG_2, BPF_REG_10), BPF_ALU64_IMM(BPF_ADD, BPF_REG_2, -8), BPF_LD_MAP_FD(BPF_REG_1, 0), BPF_RAW_INSN(BPF_JMP | BPF_CALL, 0, 0, 0, BPF_FUNC_map_lookup_elem), BPF_JMP_IMM(BPF_JEQ, BPF_REG_0, 0, 6), BPF_MOV64_REG(BPF_REG_1, BPF_REG_0), BPF_MOV64_IMM(BPF_REG_2, 4), BPF_MOV64_IMM(BPF_REG_3, 0), BPF_MOV64_IMM(BPF_REG_4, 0), BPF_MOV64_IMM(BPF_REG_5, 0), BPF_RAW_INSN(BPF_JMP | BPF_CALL, 0, 0, 0, BPF_FUNC_csum_diff), BPF_EXIT_INSN(), }, .prog_type = BPF_PROG_TYPE_SCHED_CLS, .fixup_map_array_ro = { 3 }, .result = ACCEPT, .retval = -29, }, The issue may be with helper bpf_csum_diff(). Maybe you can check bpf_csum_diff() helper return value to confirm and take a further look at bpf_csum_diff implementations between x64 and amd64. > > 1: https://urldefense.proofpoint.com/v2/url?u=http-3A__paste.ubuntu.com_p_tXXFGCPwbp_&d=DwIBAg&c=5VD0RTtNlTh3ycd41b3MUw&r=DA8e1B5r073vIqRrFz7MRA&m=ZFMh015yCHn-UOzwTfOnv5EUl8RHzWSgWyA7VzEAMTk&s=ZgEA0NOpPuepI2DQik8cv3bTDyF6Wx61yOB1OtnpCg0&e= >