Home
last modified time | relevance | path

Searched refs:bpf_strncmp (Results 1 – 17 of 17) sorted by relevance

/linux-6.15/tools/testing/selftests/bpf/progs/
H A Dbpf_iter_tasks.c118 if (bpf_strncmp(task_str2, 10, "test_data\0") != 0 || ret != 10 || task->tgid != pid) { in dump_task_sleepable()
125 if (bpf_strncmp(task_str3, 2, "t\0") != 0 || ret != 2) { in dump_task_sleepable()
132 if (bpf_strncmp(task_str4, 10, "test_data\0") != 0 || ret != 10 in dump_task_sleepable()
140 if (bpf_strncmp(task_str4, 10, "test_data\0") != 0 || ret != 10 in dump_task_sleepable()
148 if (bpf_strncmp(big_str1, 10, "test_data\0") != 0 || ret != 10) { in dump_task_sleepable()
155 if (bpf_strncmp(big_str1, 4, "baba") != 0 || ret != 5000 in dump_task_sleepable()
156 || bpf_strncmp(big_str1 + 4996, 4, "bab\0") != 0) { in dump_task_sleepable()
177 if (bpf_strncmp(big_str2, 4, "baba") != 0 || ret != 5000 in dump_task_sleepable()
178 || bpf_strncmp(big_str2 + 4996, 5, "bab\0\0") != 0) { in dump_task_sleepable()
185 if (bpf_strncmp(big_str3, 4, "baba") != 0 || ret != 4996 in dump_task_sleepable()
[all …]
H A Dstrncmp_test.c28 cmp_ret = bpf_strncmp(str, STRNCMP_STR_SZ, target); in do_strncmp()
36 cmp_ret = bpf_strncmp(str, no_const_str_size, target); in strncmp_bad_not_const_str_size()
44 cmp_ret = bpf_strncmp(str, STRNCMP_STR_SZ, writable_target); in strncmp_bad_writable_target()
52 cmp_ret = bpf_strncmp(str, STRNCMP_STR_SZ, no_str_target); in strncmp_bad_not_null_term_target()
H A Dtest_attach_probe.c93 return bpf_strncmp(data, sizeof(data), "test_data") == 0; in verify_sleepable_user_copy()
107 if (bpf_strncmp(data_short, 4, "tes\0") != 0 || ret != 4) in verify_sleepable_user_copy_str()
112 if (bpf_strncmp(data_short, 4, "tes\0") != 0 || ret != 4) in verify_sleepable_user_copy_str()
123 if (bpf_strncmp(data_long, 10, "test_data\0") != 0 || ret != 10) in verify_sleepable_user_copy_str()
128 if (bpf_strncmp(data_long_pad, 10, "test_data\0") != 0 || ret != 10 || data_long_pad[19] != '\0') in verify_sleepable_user_copy_str()
H A Dtest_get_xattr.c52 if (bpf_strncmp(value1, ret, expected_value)) in BPF_PROG()
78 if (bpf_strncmp(value2, ret, expected_value)) in BPF_PROG()
H A Dkmem_cache_iter.c63 if (!bpf_strncmp(r->name, 11, "task_struct")) in slab_info_collector()
83 if (name && !bpf_strncmp(name, 11, "task_struct")) in BPF_PROG()
H A Dtask_kfunc_failure.c283 bpf_strncmp(task->comm, 17, "foo"); in BPF_PROG()
291 bpf_strncmp(task->comm + 1, 16, "foo"); in BPF_PROG()
311 bpf_strncmp(task->comm, 16, "foo"); in BPF_PROG()
H A Dtask_kfunc_success.c337 bpf_strncmp(task->comm, 12, "foo"); in BPF_PROG()
338 bpf_strncmp(task->comm, 16, "foo"); in BPF_PROG()
339 bpf_strncmp(&task->comm[8], 4, "foo"); in BPF_PROG()
H A Dstrncmp_bench.c49 if (bpf_strncmp(str, cmp_str_len + 1, target) < 0) in strncmp_helper()
H A Dsockopt_qos_to_cc.c28 if (bpf_strncmp(buf, sizeof(buf), cc_cubic)) in sockopt_qos_to_cc()
H A Duprobe_multi_session.c62 return bpf_strncmp(data, sizeof(data), "test_data") == 0; in verify_sleepable_user_copy()
H A Dtest_set_remove_xattr.c31 return !bpf_strncmp(name_buf, sizeof(xattr_foo), xattr_foo); in name_match_foo()
H A Duprobe_multi.c41 return bpf_strncmp(data, sizeof(data), "test_data") == 0; in verify_sleepable_user_copy()
H A Dsetget_sockopt.c221 if (!bpf_strncmp(old_cc, sizeof(old_cc), cubic_cc)) { in bpf_test_tcp_sockopt()
233 if (bpf_strncmp(tmp_cc, sizeof(tmp_cc), new_cc)) in bpf_test_tcp_sockopt()
H A Ddynptr_success.c541 bpf_strncmp(data, 10, "foo"); in test_dynptr_skb_strcmp()
H A Ddynptr_fail.c409 bpf_strncmp((const char *)&ptr, sizeof(ptr), "hello!"); in invalid_helper1()
/linux-6.15/tools/testing/selftests/sched_ext/
H A Dselect_cpu_dfl.bpf.c19 return !bpf_strncmp(p->comm, 9, "select_cpu"); in task_is_test()
/linux-6.15/kernel/bpf/
H A Dhelpers.c573 BPF_CALL_3(bpf_strncmp, const char *, s1, u32, s1_sz, const char *, s2) in BPF_CALL_3() argument
579 .func = bpf_strncmp,