Lines Matching refs:res
78 const char *define_name, bool res, const char *define_prefix) in print_bool_feature() argument
81 jsonw_bool_field(json_wtr, feat_name, res); in print_bool_feature()
84 res ? "" : "NO_", define_name); in print_bool_feature()
86 printf("%s is %savailable\n", plain_name, res ? "" : "NOT "); in print_bool_feature()
93 int res; in print_kernel_option() local
101 res = strtol(value, &endptr, 0); in print_kernel_option()
103 jsonw_int_field(json_wtr, name, res); in print_kernel_option()
175 long res; in read_procfs() local
181 res = getline(&line, &len, fd); in read_procfs()
183 if (res < 0) in read_procfs()
187 res = strtol(line, &endptr, 10); in read_procfs()
189 res = -1; in read_procfs()
192 return res; in read_procfs()
197 long res; in probe_unprivileged_disabled() local
201 res = read_procfs("/proc/sys/kernel/unprivileged_bpf_disabled"); in probe_unprivileged_disabled()
203 jsonw_int_field(json_wtr, "unprivileged_bpf_disabled", res); in probe_unprivileged_disabled()
205 switch (res) { in probe_unprivileged_disabled()
219 printf("bpf() syscall restriction has unknown value %ld\n", res); in probe_unprivileged_disabled()
226 long res; in probe_jit_enable() local
230 res = read_procfs("/proc/sys/net/core/bpf_jit_enable"); in probe_jit_enable()
232 jsonw_int_field(json_wtr, "bpf_jit_enable", res); in probe_jit_enable()
234 switch (res) { in probe_jit_enable()
249 res); in probe_jit_enable()
256 long res; in probe_jit_harden() local
260 res = read_procfs("/proc/sys/net/core/bpf_jit_harden"); in probe_jit_harden()
262 jsonw_int_field(json_wtr, "bpf_jit_harden", res); in probe_jit_harden()
264 switch (res) { in probe_jit_harden()
279 res); in probe_jit_harden()
286 long res; in probe_jit_kallsyms() local
290 res = read_procfs("/proc/sys/net/core/bpf_jit_kallsyms"); in probe_jit_kallsyms()
292 jsonw_int_field(json_wtr, "bpf_jit_kallsyms", res); in probe_jit_kallsyms()
294 switch (res) { in probe_jit_kallsyms()
305 printf("JIT kallsyms exports status has unknown value %ld\n", res); in probe_jit_kallsyms()
312 long res; in probe_jit_limit() local
316 res = read_procfs("/proc/sys/net/core/bpf_jit_limit"); in probe_jit_limit()
318 jsonw_int_field(json_wtr, "bpf_jit_limit", res); in probe_jit_limit()
320 switch (res) { in probe_jit_limit()
325 printf("Global memory limit for JIT compiler for unprivileged users is %ld bytes\n", res); in probe_jit_limit()
499 bool res; in probe_bpf_syscall() local
502 res = (errno != ENOSYS); in probe_bpf_syscall()
507 res, define_prefix); in probe_bpf_syscall()
509 return res; in probe_bpf_syscall()
553 bool res; in probe_prog_type() local
564 res = probe_prog_type_ifindex(prog_type, ifindex); in probe_prog_type()
566 res = libbpf_probe_bpf_prog_type(prog_type, NULL) > 0; in probe_prog_type()
574 res = false; in probe_prog_type()
577 supported_types[prog_type] |= res; in probe_prog_type()
589 print_bool_feature(feat_name, plain_desc, define_name, res, in probe_prog_type()
620 bool res; in probe_map_type() local
631 res = probe_map_type_ifindex(map_type, ifindex); in probe_map_type()
633 res = libbpf_probe_bpf_map_type(map_type, NULL) > 0; in probe_map_type()
650 print_bool_feature(feat_name, plain_desc, define_name, res, in probe_map_type()
663 bool res; in probe_helper_ifindex() local
667 res = !grep(buf, "invalid func ") && !grep(buf, "unknown func ") && in probe_helper_ifindex()
672 res = res && !grep(buf, "not supported by FW") && in probe_helper_ifindex()
679 return res; in probe_helper_ifindex()
687 bool res = false; in probe_helper_for_progtype() local
691 res = probe_helper_ifindex(id, prog_type, ifindex); in probe_helper_for_progtype()
693 res = libbpf_probe_bpf_helper(prog_type, id, NULL) > 0; in probe_helper_for_progtype()
700 res = false; in probe_helper_for_progtype()
705 if (res) in probe_helper_for_progtype()
710 res ? "1" : "0"); in probe_helper_for_progtype()
712 if (res) in probe_helper_for_progtype()
716 return res; in probe_helper_for_progtype()
789 bool res; in probe_misc_feature() local
795 res = fd >= 0 || !errno; in probe_misc_feature()
800 print_bool_feature(feat_name, plain_name, define_name, res, in probe_misc_feature()
941 bool res; in section_syscall_config() local
947 res = probe_bpf_syscall(define_prefix); in section_syscall_config()
950 return res; in section_syscall_config()
1082 int res = -1; in handle_perms() local
1124 res = 0; in handle_perms()
1158 res = 0; in handle_perms()
1161 if (cap_free(caps) && !res) { in handle_perms()
1164 res = -1; in handle_perms()
1167 return res; in handle_perms()