Searched refs:bpf_strnchr (Results 1 – 4 of 4) sorted by relevance
| /linux/tools/testing/selftests/bpf/progs/ |
| H A D | string_kfuncs_success.c | 25 __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 D | string_kfuncs_failure1.c | 38 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 D | string_kfuncs_failure2.c | 13 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 D | helpers.c | 3491 __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);
|