[15:50:51][root@168.mr1370_220926_1234.el9.ppc64le]# './test_progs -t test_lsm' libbpf: failed to find kernel BTF type ID of '__x64_sys_setdomainname': -3 libbpf: prog 'test_sys_setdomainname': failed to prepare load attributes: -3 libbpf: failed to load program 'test_sys_setdomainname' libbpf: failed to load object 'lsm' libbpf: failed to load BPF skeleton 'lsm': -3 test_test_lsm:FAIL:lsm_skel_load unexpected error: -3 #169 test_lsm:FAIL All error logs: #169 test_lsm:FAIL libbpf: failed to find kernel BTF type ID of '__x64_sys_setdomainname': -3 libbpf: prog 'test_sys_setdomainname': failed to prepare load attributes: -3 libbpf: failed to load program 'test_sys_setdomainname' libbpf: failed to load object 'lsm' libbpf: failed to load BPF skeleton 'lsm': -3 test_test_lsm:FAIL:lsm_skel_load unexpected error: -3 Summary: 0/0 PASSED, 0 SKIPPED, 1 FAILED :: [ FAIL ] :: Command './test_progs -t test_lsm' (Expected 0, got 1, score 43) [15:50:52][root@168.mr1370_220926_1234.el9.ppc64le]# './test_progs -vv -t test_lsm' bpf_testmod.ko is already unloaded. Loading bpf_testmod.ko... Successfully loaded bpf_testmod.ko. libbpf: loading object 'lsm' from buffer libbpf: elf: section(2) .symtab, size 912, link 1, flags 0, type=2 libbpf: elf: section(3) lsm/file_mprotect, size 208, link 0, flags 6, type=1 libbpf: sec 'lsm/file_mprotect': found program 'test_int_hook' at insn offset 0 (0 bytes), code size 26 insns (208 bytes) libbpf: elf: section(4) lsm.s/bprm_committed_creds, size 824, link 0, flags 6, type=1 libbpf: sec 'lsm.s/bprm_committed_creds': found program 'test_void_hook' at insn offset 0 (0 bytes), code size 103 insns (824 bytes) libbpf: elf: section(5) lsm/task_free, size 16, link 0, flags 6, type=1 libbpf: sec 'lsm/task_free': found program 'test_task_free' at insn offset 0 (0 bytes), code size 2 insns (16 bytes) libbpf: elf: section(6) fentry.s/__x64_sys_setdomainname, size 192, link 0, flags 6, type=1 libbpf: sec 'fentry.s/__x64_sys_setdomainname': found program 'test_sys_setdomainname' at insn offset 0 (0 bytes), code size 24 insns (192 bytes) libbpf: elf: section(7) .maps, size 296, link 0, flags 3, type=1 libbpf: elf: section(8) license, size 4, link 0, flags 3, type=1 libbpf: license of lsm is GPL libbpf: elf: section(9) .bss, size 16, link 0, flags 3, type=8 libbpf: elf: section(10) .rellsm/file_mprotect, size 32, link 2, flags 40, type=9 libbpf: elf: section(11) .rellsm.s/bprm_committed_creds, size 160, link 2, flags 40, type=9 libbpf: elf: section(12) .relfentry.s/__x64_sys_setdomainname, size 16, link 2, flags 40, type=9 libbpf: elf: section(13) .rel.maps, size 32, link 2, flags 40, type=9 libbpf: elf: section(14) .BTF, size 9887, link 0, flags 0, type=1 libbpf: elf: section(15) .BTF.ext, size 1684, link 0, flags 0, type=1 libbpf: looking for externs among 38 symbols... libbpf: collected 0 externs total libbpf: map 'inner_map': at sec_idx 7, offset 0. libbpf: map 'inner_map': found type = 2. libbpf: map 'inner_map': found key [2], sz = 4. libbpf: map 'inner_map': found value [9], sz = 8. libbpf: map 'inner_map': found max_entries = 1. libbpf: map 'outer_arr': at sec_idx 7, offset 32. libbpf: map 'outer_arr': found type = 12. libbpf: map 'outer_arr': found key_size = 4. libbpf: map 'outer_arr': found value_size = 4. libbpf: map 'outer_arr': found max_entries = 1. libbpf: map 'outer_arr': found inner map definition. libbpf: map 'outer_arr.inner': found type = 2. libbpf: map 'outer_arr.inner': found key [2], sz = 4. libbpf: map 'outer_arr.inner': found value [9], sz = 8. libbpf: map 'outer_arr.inner': found max_entries = 1. libbpf: map 'outer_hash': at sec_idx 7, offset 72. libbpf: map 'outer_hash': found type = 13. libbpf: map 'outer_hash': found key_size = 4. libbpf: map 'outer_hash': found max_entries = 1. libbpf: map 'outer_hash': found inner map definition. libbpf: map 'outer_hash.inner': found type = 2. libbpf: map 'outer_hash.inner': found key [2], sz = 4. libbpf: map 'outer_hash.inner': found value [9], sz = 8. libbpf: map 'outer_hash.inner': found max_entries = 1. libbpf: map 'array': at sec_idx 7, offset 104. libbpf: map 'array': found type = 2. libbpf: map 'array': found key [26], sz = 4. libbpf: map 'array': found value [9], sz = 8. libbpf: map 'array': found max_entries = 1. libbpf: map 'hash': at sec_idx 7, offset 136. libbpf: map 'hash': found type = 1. libbpf: map 'hash': found key [26], sz = 4. libbpf: map 'hash': found value [9], sz = 8. libbpf: map 'hash': found max_entries = 1. libbpf: map 'lru_hash': at sec_idx 7, offset 168. libbpf: map 'lru_hash': found type = 9. libbpf: map 'lru_hash': found key [26], sz = 4. libbpf: map 'lru_hash': found value [9], sz = 8. libbpf: map 'lru_hash': found max_entries = 1. libbpf: map 'percpu_array': at sec_idx 7, offset 200. libbpf: map 'percpu_array': found type = 6. libbpf: map 'percpu_array': found key [26], sz = 4. libbpf: map 'percpu_array': found value [9], sz = 8. libbpf: map 'percpu_array': found max_entries = 1. libbpf: map 'percpu_hash': at sec_idx 7, offset 232. libbpf: map 'percpu_hash': found type = 5. libbpf: map 'percpu_hash': found key [26], sz = 4. libbpf: map 'percpu_hash': found value [9], sz = 8. libbpf: map 'percpu_hash': found max_entries = 1. libbpf: map 'lru_percpu_hash': at sec_idx 7, offset 264. libbpf: map 'lru_percpu_hash': found type = 10. libbpf: map 'lru_percpu_hash': found key [26], sz = 4. libbpf: map 'lru_percpu_hash': found value [9], sz = 8. libbpf: map 'lru_percpu_hash': found max_entries = 1. libbpf: map 'lsm.bss' (global data): at sec_idx 9, offset 0, flags 400. libbpf: map 9 is "lsm.bss" libbpf: sec '.rellsm/file_mprotect': collecting relocation for section(3) 'lsm/file_mprotect' libbpf: sec '.rellsm/file_mprotect': relo #0: insn #14 against 'monitored_pid' libbpf: prog 'test_int_hook': found data map 9 (lsm.bss, sec 9, off 0) for insn 14 libbpf: sec '.rellsm/file_mprotect': relo #1: insn #19 against 'mprotect_count' libbpf: prog 'test_int_hook': found data map 9 (lsm.bss, sec 9, off 0) for insn 19 libbpf: sec '.rellsm.s/bprm_committed_creds': collecting relocation for section(4) 'lsm.s/bprm_committed_creds' libbpf: sec '.rellsm.s/bprm_committed_creds': relo #0: insn #4 against 'monitored_pid' libbpf: prog 'test_void_hook': found data map 9 (lsm.bss, sec 9, off 0) for insn 4 libbpf: sec '.rellsm.s/bprm_committed_creds': relo #1: insn #9 against 'bprm_count' libbpf: prog 'test_void_hook': found data map 9 (lsm.bss, sec 9, off 0) for insn 9 libbpf: sec '.rellsm.s/bprm_committed_creds': relo #2: insn #29 against 'array' libbpf: prog 'test_void_hook': found map 3 (array, sec 7, off 104) for insn #29 libbpf: sec '.rellsm.s/bprm_committed_creds': relo #3: insn #37 against 'hash' libbpf: prog 'test_void_hook': found map 4 (hash, sec 7, off 136) for insn #37 libbpf: sec '.rellsm.s/bprm_committed_creds': relo #4: insn #45 against 'lru_hash' libbpf: prog 'test_void_hook': found map 5 (lru_hash, sec 7, off 168) for insn #45 libbpf: sec '.rellsm.s/bprm_committed_creds': relo #5: insn #53 against 'percpu_array' libbpf: prog 'test_void_hook': found map 6 (percpu_array, sec 7, off 200) for insn #53 libbpf: sec '.rellsm.s/bprm_committed_creds': relo #6: insn #61 against 'percpu_hash' libbpf: prog 'test_void_hook': found map 7 (percpu_hash, sec 7, off 232) for insn #61 libbpf: sec '.rellsm.s/bprm_committed_creds': relo #7: insn #69 against 'lru_percpu_hash' libbpf: prog 'test_void_hook': found map 8 (lru_percpu_hash, sec 7, off 264) for insn #69 libbpf: sec '.rellsm.s/bprm_committed_creds': relo #8: insn #77 against 'outer_arr' libbpf: prog 'test_void_hook': found map 1 (outer_arr, sec 7, off 32) for insn #77 libbpf: sec '.rellsm.s/bprm_committed_creds': relo #9: insn #90 against 'outer_hash' libbpf: prog 'test_void_hook': found map 2 (outer_hash, sec 7, off 72) for insn #90 libbpf: sec '.relfentry.s/__x64_sys_setdomainname': collecting relocation for section(6) 'fentry.s/__x64_sys_setdomainname' libbpf: sec '.relfentry.s/__x64_sys_setdomainname': relo #0: insn #17 against 'copy_test' libbpf: prog 'test_sys_setdomainname': found data map 9 (lsm.bss, sec 9, off 0) for insn 17 libbpf: .maps relo #0: for 36 value 0 rel->r_offset 64 name 436 ('inner_map') libbpf: .maps relo #0: map 'outer_arr' slot [0] points to map 'inner_map' libbpf: .maps relo #1: for 36 value 0 rel->r_offset 96 name 436 ('inner_map') libbpf: .maps relo #1: map 'outer_hash' slot [0] points to map 'inner_map' libbpf: loading kernel BTF '/sys/kernel/btf/vmlinux': 0 libbpf: map 'inner_map': created successfully, fd=5 libbpf: map 'outer_arr': created successfully, fd=7 libbpf: map 'outer_arr': slot [0] set to map 'inner_map' fd=5 libbpf: map 'outer_hash': created successfully, fd=8 libbpf: map 'outer_hash': slot [0] set to map 'inner_map' fd=5 libbpf: map 'array': created successfully, fd=6 libbpf: map 'hash': created successfully, fd=9 libbpf: map 'lru_hash': created successfully, fd=10 libbpf: map 'percpu_array': created successfully, fd=11 libbpf: map 'percpu_hash': created successfully, fd=12 libbpf: map 'lru_percpu_hash': created successfully, fd=13 libbpf: map 'lsm.bss': created successfully, fd=14 libbpf: sec 'lsm/file_mprotect': found 6 CO-RE relocations libbpf: CO-RE relocating [51] struct vm_area_struct: found target candidate [320] struct vm_area_struct in [vmlinux] libbpf: prog 'test_int_hook': relo #0: kind (0), spec is [51] struct vm_area_struct.vm_mm (0:6 @ offset 64) libbpf: prog 'test_int_hook': relo #0: matching candidate #0 [320] struct vm_area_struct.vm_mm (0:6 @ offset 64) libbpf: prog 'test_int_hook': relo #0: patched insn #6 (LDX/ST/STX) off 64 -> 64 libbpf: prog 'test_int_hook': relo #1: kind (0), spec is [51] struct vm_area_struct.vm_start (0:0 @ offset 0) libbpf: prog 'test_int_hook': relo #1: matching candidate #0 [320] struct vm_area_struct.vm_start (0:0 @ offset 0) libbpf: prog 'test_int_hook': relo #1: patched insn #7 (LDX/ST/STX) off 0 -> 0 libbpf: CO-RE relocating [78] struct mm_struct: found target candidate [335] struct mm_struct in [vmlinux] libbpf: prog 'test_int_hook': relo #2: kind (0), spec is [78] struct mm_struct.start_stack (0:0:34 @ offset 288) libbpf: prog 'test_int_hook': relo #2: matching candidate #0 [335] struct mm_struct.start_stack (0:0:34 @ offset 288) libbpf: prog 'test_int_hook': relo #2: patched insn #8 (LDX/ST/STX) off 288 -> 288 libbpf: prog 'test_int_hook': relo #3: kind (0), spec is [51] struct vm_area_struct.vm_mm (0:6 @ offset 64) libbpf: prog 'test_int_hook': relo #3: matching candidate #0 [320] struct vm_area_struct.vm_mm (0:6 @ offset 64) libbpf: prog 'test_int_hook': relo #3: patched insn #10 (LDX/ST/STX) off 64 -> 64 libbpf: prog 'test_int_hook': relo #4: kind (0), spec is [78] struct mm_struct.start_stack (0:0:34 @ offset 288) libbpf: prog 'test_int_hook': relo #4: matching candidate #0 [335] struct mm_struct.start_stack (0:0:34 @ offset 288) libbpf: prog 'test_int_hook': relo #4: patched insn #11 (LDX/ST/STX) off 288 -> 288 libbpf: prog 'test_int_hook': relo #5: kind (0), spec is [51] struct vm_area_struct.vm_end (0:1 @ offset 8) libbpf: prog 'test_int_hook': relo #5: matching candidate #0 [320] struct vm_area_struct.vm_end (0:1 @ offset 8) libbpf: prog 'test_int_hook': relo #5: patched insn #12 (LDX/ST/STX) off 8 -> 8 libbpf: sec 'lsm.s/bprm_committed_creds': found 5 CO-RE relocations libbpf: CO-RE relocating [137] struct linux_binprm: found target candidate [1603] struct linux_binprm in [vmlinux] libbpf: prog 'test_void_hook': relo #0: kind (0), spec is [137] struct linux_binprm.vma (0:0 @ offset 0) libbpf: prog 'test_void_hook': relo #0: matching candidate #0 [1603] struct linux_binprm.vma (0:0 @ offset 0) libbpf: prog 'test_void_hook': relo #0: patched insn #14 (LDX/ST/STX) off 0 -> 0 libbpf: prog 'test_void_hook': relo #1: kind (0), spec is [51] struct vm_area_struct.vm_mm (0:6 @ offset 64) libbpf: prog 'test_void_hook': relo #1: matching candidate #0 [320] struct vm_area_struct.vm_mm (0:6 @ offset 64) libbpf: prog 'test_void_hook': relo #1: patched insn #15 (LDX/ST/STX) off 64 -> 64 libbpf: prog 'test_void_hook': relo #2: kind (0), spec is [78] struct mm_struct.arg_start (0:0:35 @ offset 296) libbpf: prog 'test_void_hook': relo #2: matching candidate #0 [335] struct mm_struct.arg_start (0:0:35 @ offset 296) libbpf: prog 'test_void_hook': relo #2: patched insn #16 (LDX/ST/STX) off 296 -> 296 libbpf: prog 'test_void_hook': relo #3: kind (0), spec is [137] struct linux_binprm.mm (0:2 @ offset 16) libbpf: prog 'test_void_hook': relo #3: matching candidate #0 [1603] struct linux_binprm.mm (0:2 @ offset 16) libbpf: prog 'test_void_hook': relo #3: patched insn #22 (LDX/ST/STX) off 16 -> 16 libbpf: prog 'test_void_hook': relo #4: kind (0), spec is [78] struct mm_struct.arg_start (0:0:35 @ offset 296) libbpf: prog 'test_void_hook': relo #4: matching candidate #0 [335] struct mm_struct.arg_start (0:0:35 @ offset 296) libbpf: prog 'test_void_hook': relo #4: patched insn #23 (LDX/ST/STX) off 296 -> 296 libbpf: sec 'fentry.s/__x64_sys_setdomainname': found 2 CO-RE relocations libbpf: CO-RE relocating [147] struct pt_regs: found target candidate [104] struct pt_regs in [vmlinux] libbpf: prog 'test_sys_setdomainname': relo #0: kind (0), spec is [147] struct pt_regs.gpr[4] (0:0:1:0:4 @ offset 32) libbpf: prog 'test_sys_setdomainname': relo #0: matching candidate #0 [104] struct pt_regs.gpr[4] (0:0:1:0:4 @ offset 32) libbpf: prog 'test_sys_setdomainname': relo #0: patched insn #1 (LDX/ST/STX) off 32 -> 32 libbpf: prog 'test_sys_setdomainname': relo #1: kind (0), spec is [147] struct pt_regs.gpr[3] (0:0:1:0:3 @ offset 24) libbpf: prog 'test_sys_setdomainname': relo #1: matching candidate #0 [104] struct pt_regs.gpr[3] (0:0:1:0:3 @ offset 24) libbpf: prog 'test_sys_setdomainname': relo #1: patched insn #2 (LDX/ST/STX) off 24 -> 24 libbpf: failed to find kernel BTF type ID of '__x64_sys_setdomainname': -3 libbpf: prog 'test_sys_setdomainname': failed to prepare load attributes: -3 libbpf: failed to load program 'test_sys_setdomainname' libbpf: failed to load object 'lsm' libbpf: failed to load BPF skeleton 'lsm': -3 test_test_lsm:FAIL:lsm_skel_load unexpected error: -3 #169 test_lsm:FAIL All error logs: #169 test_lsm:FAIL Summary: 0/0 PASSED, 0 SKIPPED, 1 FAILED Successfully unloaded bpf_testmod.ko. :: [ FAIL ] :: Command './test_progs -vv -t test_lsm' (Expected 0, got 1, score 43) [15:50:53][root@168.mr1370_220926_1234.el9.ppc64le]# './test_progs-no_alu32 -t test_lsm' libbpf: failed to find kernel BTF type ID of '__x64_sys_setdomainname': -3 libbpf: prog 'test_sys_setdomainname': failed to prepare load attributes: -3 libbpf: failed to load program 'test_sys_setdomainname' libbpf: failed to load object 'lsm' libbpf: failed to load BPF skeleton 'lsm': -3 test_test_lsm:FAIL:lsm_skel_load unexpected error: -3 #169 test_lsm:FAIL All error logs: #169 test_lsm:FAIL libbpf: failed to find kernel BTF type ID of '__x64_sys_setdomainname': -3 libbpf: prog 'test_sys_setdomainname': failed to prepare load attributes: -3 libbpf: failed to load program 'test_sys_setdomainname' libbpf: failed to load object 'lsm' libbpf: failed to load BPF skeleton 'lsm': -3 test_test_lsm:FAIL:lsm_skel_load unexpected error: -3 Summary: 0/0 PASSED, 0 SKIPPED, 1 FAILED :: [ FAIL ] :: Command './test_progs-no_alu32 -t test_lsm' (Expected 0, got 1, score 43) === Dmesg result === :: [ FAIL ] :: Test '169..224 selftests: bpf_test_progs:test_lsm [FAIL]'