/linux-tools/ebpf/kernel-samples-bpf/ |
H A D | sockconn4lb_admin.c | 27 int fd, rc; in get_root_fd() local 45 rc = sys_bpf(BPF_OBJ_PIN, &attr_pin, sizeof(attr_pin)); in get_root_fd() 46 if (rc != 0) { in get_root_fd() 85 int i, rc, fd, n; in main() local 105 rc = sys_bpf(BPF_MAP_LOOKUP_ELEM, &attr_elem, sizeof(attr_elem)); in main() 106 if (rc!=0) { in main() 122 rc = sys_bpf(BPF_MAP_LOOKUP_ELEM, &attr_elem, sizeof(attr_elem)); in main() 123 if (rc!=0) { in main() 132 rc = sys_bpf(BPF_MAP_UPDATE_ELEM, &attr_elem, sizeof(attr_elem)); in main() 133 if (rc!=0) { in main() [all …]
|
H A D | ipfirewall_cmd.c | 50 int fd, rc; in main() local 74 rc = sys_bpf(BPF_MAP_UPDATE_ELEM, &attr_elem, sizeof(attr_elem)); in main() 75 if (rc<0) { in main() 87 rc = sys_bpf(BPF_MAP_UPDATE_ELEM, &attr_elem, sizeof(attr_elem)); in main() 88 if (rc<0) { in main()
|
H A D | l3lb_cmd.c | 53 int fd, rc; in main() local 94 rc = sys_bpf(BPF_MAP_UPDATE_ELEM, &attr_elem, sizeof(attr_elem)); in main() 95 if (rc<0) { in main()
|
H A D | l3lb_kern.c | 83 int i, o_ifindex=0, rc; in xdp_ipv4_l3lb() local 158 …rc = bpf_fib_lookup(ctx, &fib_params, sizeof(fib_params), BPF_FIB_LOOKUP_DIRECT); // 0, BPF_FIB_LO… in xdp_ipv4_l3lb() 159 if (rc == BPF_FIB_LKUP_RET_SUCCESS) { in xdp_ipv4_l3lb() 164 bpf_printk("fib failed: %d, try sending icmp ping?\n", rc); in xdp_ipv4_l3lb()
|
/linux-tools/ebpf/libbpf-bootstrap/ |
H A D | kprobe_client.c | 22 int fd, rc; in get_root_fd() local 32 int i, rc, fd; in main() local 47 rc = sys_bpf(BPF_MAP_LOOKUP_ELEM, &attr_elem, sizeof(attr_elem)); in main() 48 if (rc!=0) { in main()
|
/linux-tools/perf/uprobe/ |
H A D | uprobe.cpp | 38 int rc = fread(&ehdr, sizeof(ehdr), 1, fp); in parse_elf64() local 39 if (rc != 1) return; in parse_elf64() 49 rc = fseek(fp, offset, SEEK_SET); in parse_elf64() 50 if (rc<0) { perror("fail to seek"); return; } in parse_elf64() 51 rc = fread(&phdr, sizeof(phdr), 1, fp); in parse_elf64() 52 if (rc != 1) { perror("fail to read program header"); return; } in parse_elf64() 66 rc = fseek(fp, offset, SEEK_SET); in parse_elf64() 67 if (rc<0) { perror("fail to seek"); return; } in parse_elf64() 68 rc = fread(&shdr, sizeof(shdr), 1, fp); in parse_elf64() 69 if (rc != 1) { perror("fail to read sec header"); return; } in parse_elf64() [all …]
|
/linux-tools/drivers/mremap/module/ |
H A D | remap.c | 28 long rc; in main() local 59 rc = ioctl(fd, PTRACEXX_REMAP, &d); in main() 60 if (rc<0) { in main() 61 printf("fail to remap %ld\n", rc); in main()
|
H A D | ptracexx.c | 40 unsigned long rc; in ptracexx_ioctl() local 61 rc = mremap_task(task, in ptracexx_ioctl() 65 if (IS_ERR((void*)rc)) { in ptracexx_ioctl() 66 printk("remap failed: %ld\n", rc); in ptracexx_ioctl()
|
/linux-tools/perf/profiler/ |
H A D | profiler-kprobe.cpp | 72 int rc = fread(&ehdr, sizeof(ehdr), 1, fp); in parse_elf64() local 73 if (rc != 1) return; in parse_elf64() 84 rc = fseek(fp, offset, SEEK_SET); in parse_elf64() 85 if (rc<0) { perror("fail to seek"); return; } in parse_elf64() 86 rc = fread(&phdr, sizeof(phdr), 1, fp); in parse_elf64() 87 if (rc != 1) { perror("fail to read program header"); return; } in parse_elf64() 106 rc = fseek(fp, offset, SEEK_SET); in parse_elf64() 107 if (rc<0) { perror("fail to seek"); return; } in parse_elf64() 108 rc = fread(&shdr, sizeof(shdr), 1, fp); in parse_elf64() 109 if (rc != 1) { perror("fail to read sec header"); return; } in parse_elf64() [all …]
|
H A D | profiler.cpp | 75 int rc = fread(&ehdr, sizeof(ehdr), 1, fp); in parse_elf64() local 76 if (rc != 1) return; in parse_elf64() 87 rc = fseek(fp, offset, SEEK_SET); in parse_elf64() 88 if (rc<0) { perror("fail to seek"); return; } in parse_elf64() 89 rc = fread(&phdr, sizeof(phdr), 1, fp); in parse_elf64() 90 if (rc != 1) { perror("fail to read program header"); return; } in parse_elf64() 109 rc = fseek(fp, offset, SEEK_SET); in parse_elf64() 110 if (rc<0) { perror("fail to seek"); return; } in parse_elf64() 111 rc = fread(&shdr, sizeof(shdr), 1, fp); in parse_elf64() 112 if (rc != 1) { perror("fail to read sec header"); return; } in parse_elf64() [all …]
|
/linux-tools/perf/contextswitch/ |
H A D | perf_cxt_switch_3.cpp | 72 int rc = fread(&ehdr, sizeof(ehdr), 1, fp); in parse_elf64() local 73 if (rc != 1) return; in parse_elf64() 84 rc = fseek(fp, offset, SEEK_SET); in parse_elf64() 85 if (rc<0) { perror("fail to seek"); return; } in parse_elf64() 86 rc = fread(&phdr, sizeof(phdr), 1, fp); in parse_elf64() 87 if (rc != 1) { perror("fail to read program header"); return; } in parse_elf64() 106 rc = fseek(fp, offset, SEEK_SET); in parse_elf64() 107 if (rc<0) { perror("fail to seek"); return; } in parse_elf64() 108 rc = fread(&shdr, sizeof(shdr), 1, fp); in parse_elf64() 109 if (rc != 1) { perror("fail to read sec header"); return; } in parse_elf64() [all …]
|
/linux-tools/drivers/mremap/ |
H A D | inject.cpp | 119 long rc; in main() local 229 rc = ioctl(fd, PTRACEXX_REMAP, &d); in main() 230 if (rc<0) { in main() 231 printf("fail to remap %ld\n", rc); in main() 239 rc = ioctl(fd, PTRACEXX_REMAP, &d); in main() 240 if (rc<0) { in main() 241 printf("fail to remap %ld\n", rc); in main()
|