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.c32 __test(1) int test_strnchr_found(void *ctx) { return bpf_strnchr(str, 5, 'e'); } in test_strnlen()
33 __test(11) int test_strnchr_null(void *ctx) { return bpf_strnchr(str, 12, '\0'); } in test_strspn()
34 __test(-ENOENT) int test_strnchr_notfound(void *ctx) { return bpf_strnchr(str, 5, 'w'); } in test_strcspn()
H A Dstring_kfuncs_failure1.c40 SEC("syscall") __retval(USER_PTR_ERR)int test_strnchr_null(void *ctx) { return bpf_strnchr(NULL, 1, 'a'); } in __retval()
66 SEC("syscall") __retval(USER_PTR_ERR) int test_strnchr_user_ptr(void *ctx) { return bpf_strnchr(user_ptr, 1, 'a'); } in __retval()
94 SEC("syscall") __retval(-EFAULT) int test_strnchr_pagefault(void *ctx) { return bpf_strnchr(invalid_kern_ptr, 1, 'a'); } in test_strcspn_pagefault1()
H A Dstring_kfuncs_failure2.c14 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.c3587 __bpf_kfunc int bpf_strnchr(const char *s__ign, size_t count, char c) in bpf_strnchr() function
3626 return bpf_strnchr(s__ign, XATTR_SIZE_MAX, c); in bpf_strchr()
4668 BTF_ID_FLAGS(func, bpf_strnchr);