Home
last modified time | relevance | path

Searched refs:bpf_strnchr (Results 1 – 4 of 4) sorted by relevance

/linux/tools/testing/selftests/bpf/progs/
H A Dstring_kfuncs_success.c25 __test(1) int test_strnchr_found(void *ctx) { return bpf_strnchr(str, 5, 'e'); } in test_strnchr_found()
26 __test(11) int test_strnchr_null(void *ctx) { return bpf_strnchr(str, 12, '\0'); } in test_strnchr_null()
27 __test(-ENOENT) int test_strnchr_notfound(void *ctx) { return bpf_strnchr(str, 5, 'w'); } in test_strnchr_notfound()
H A Dstring_kfuncs_failure1.c38 SEC("syscall") __retval(USER_PTR_ERR)int test_strnchr_null(void *ctx) { return bpf_strnchr(NULL, 1, 'a'); } in __retval()
62 SEC("syscall") __retval(USER_PTR_ERR) int test_strnchr_user_ptr(void *ctx) { return bpf_strnchr(user_ptr, 1, 'a'); } in __retval()
88 SEC("syscall") __retval(-EFAULT) int test_strnchr_pagefault(void *ctx) { return bpf_strnchr(invalid_kern_ptr, 1, 'a'); }
H A Dstring_kfuncs_failure2.c13 SEC("syscall") int test_strnchr_too_long(void *ctx) { return bpf_strnchr(long_str, sizeof(long_str), 'b'); } in test_strrchr_too_long()
/linux/kernel/bpf/
H A Dhelpers.c3491 __bpf_kfunc int bpf_strnchr(const char *s__ign, size_t count, char c) in bpf_strnchr() function
3530 return bpf_strnchr(s__ign, XATTR_SIZE_MAX, c); in bpf_strchr()
4526 BTF_ID_FLAGS(func, bpf_strnchr);