Lines Matching refs:size
153 bpf_probe_read_user_common(void *dst, u32 size, const void __user *unsafe_ptr) in bpf_probe_read_user_common() argument
157 ret = copy_from_user_nofault(dst, unsafe_ptr, size); in bpf_probe_read_user_common()
159 memset(dst, 0, size); in bpf_probe_read_user_common()
163 BPF_CALL_3(bpf_probe_read_user, void *, dst, u32, size, in BPF_CALL_3() argument
166 return bpf_probe_read_user_common(dst, size, unsafe_ptr); in BPF_CALL_3()
179 bpf_probe_read_user_str_common(void *dst, u32 size, in bpf_probe_read_user_str_common() argument
194 ret = strncpy_from_user_nofault(dst, unsafe_ptr, size); in bpf_probe_read_user_str_common()
196 memset(dst, 0, size); in bpf_probe_read_user_str_common()
200 BPF_CALL_3(bpf_probe_read_user_str, void *, dst, u32, size, in BPF_CALL_3() argument
203 return bpf_probe_read_user_str_common(dst, size, unsafe_ptr); in BPF_CALL_3()
216 bpf_probe_read_kernel_common(void *dst, u32 size, const void *unsafe_ptr) in bpf_probe_read_kernel_common() argument
220 ret = copy_from_kernel_nofault(dst, unsafe_ptr, size); in bpf_probe_read_kernel_common()
222 memset(dst, 0, size); in bpf_probe_read_kernel_common()
226 BPF_CALL_3(bpf_probe_read_kernel, void *, dst, u32, size, in BPF_CALL_3() argument
229 return bpf_probe_read_kernel_common(dst, size, unsafe_ptr); in BPF_CALL_3()
242 bpf_probe_read_kernel_str_common(void *dst, u32 size, const void *unsafe_ptr) in bpf_probe_read_kernel_str_common() argument
255 ret = strncpy_from_kernel_nofault(dst, unsafe_ptr, size); in bpf_probe_read_kernel_str_common()
257 memset(dst, 0, size); in bpf_probe_read_kernel_str_common()
261 BPF_CALL_3(bpf_probe_read_kernel_str, void *, dst, u32, size, in BPF_CALL_3() argument
264 return bpf_probe_read_kernel_str_common(dst, size, unsafe_ptr); in BPF_CALL_3()
277 BPF_CALL_3(bpf_probe_read_compat, void *, dst, u32, size, in BPF_CALL_3() argument
281 return bpf_probe_read_user_common(dst, size, in BPF_CALL_3()
284 return bpf_probe_read_kernel_common(dst, size, unsafe_ptr); in BPF_CALL_3()
296 BPF_CALL_3(bpf_probe_read_compat_str, void *, dst, u32, size, in BPF_CALL_3() argument
300 return bpf_probe_read_user_str_common(dst, size, in BPF_CALL_3()
303 return bpf_probe_read_kernel_str_common(dst, size, unsafe_ptr); in BPF_CALL_3()
317 u32, size) in BPF_CALL_3() argument
340 return copy_to_user_nofault(unsafe_ptr, src, size); in BPF_CALL_3()
539 struct bpf_perf_event_value *, buf, u32, size) in BPF_CALL_4() argument
543 if (unlikely(size != sizeof(struct bpf_perf_event_value))) in BPF_CALL_4()
551 memset(buf, 0, size); in BPF_CALL_4()
606 u64, flags, void *, data, u64, size) in BPF_CALL_5() argument
612 .size = size, in BPF_CALL_5()
664 .size = ctx_size, in bpf_event_output()
672 .size = meta_size, in bpf_event_output()
1177 static bool kprobe_prog_is_valid_access(int off, int size, enum bpf_access_type type, in kprobe_prog_is_valid_access() argument
1185 if (off % size != 0) in kprobe_prog_is_valid_access()
1191 if (off + size > sizeof(struct pt_regs)) in kprobe_prog_is_valid_access()
1206 u64, flags, void *, data, u64, size) in BPF_CALL_5() argument
1215 return ____bpf_perf_event_output(regs, map, flags, data, size); in BPF_CALL_5()
1252 BPF_CALL_4(bpf_get_stack_tp, void *, tp_buff, void *, buf, u32, size, in BPF_CALL_4() argument
1258 (unsigned long) size, flags, 0); in BPF_CALL_4()
1288 static bool tp_prog_is_valid_access(int off, int size, enum bpf_access_type type, in tp_prog_is_valid_access() argument
1296 if (off % size != 0) in tp_prog_is_valid_access()
1312 struct bpf_perf_event_value *, buf, u32, size) in BPF_CALL_3() argument
1316 if (unlikely(size != sizeof(struct bpf_perf_event_value))) in BPF_CALL_3()
1324 memset(buf, 0, size); in BPF_CALL_3()
1338 void *, buf, u32, size, u64, flags) in BPF_CALL_4() argument
1353 if (!buf || (size % br_entry_size != 0)) in BPF_CALL_4()
1356 to_copy = min_t(u32, br_stack->nr * br_entry_size, size); in BPF_CALL_4()
1425 struct bpf_map *, map, u64, flags, void *, data, u64, size) in BPF_CALL_5() argument
1434 ret = ____bpf_perf_event_output(regs, map, flags, data, size); in BPF_CALL_5()
1481 void *, buf, u32, size, u64, flags) in BPF_CALL_4() argument
1491 (unsigned long) size, flags, 0); in BPF_CALL_4()
1573 static bool raw_tp_prog_is_valid_access(int off, int size, in raw_tp_prog_is_valid_access() argument
1582 if (off % size != 0) in raw_tp_prog_is_valid_access()
1587 static bool tracing_prog_is_valid_access(int off, int size, in tracing_prog_is_valid_access() argument
1596 if (off % size != 0) in tracing_prog_is_valid_access()
1598 return btf_ctx_access(off, size, type, prog, info); in tracing_prog_is_valid_access()
1628 static bool raw_tp_writable_prog_is_valid_access(int off, int size, in raw_tp_writable_prog_is_valid_access() argument
1634 if (size != sizeof(u64) || type != BPF_READ) in raw_tp_writable_prog_is_valid_access()
1638 return raw_tp_prog_is_valid_access(off, size, type, prog, info); in raw_tp_writable_prog_is_valid_access()
1649 static bool pe_prog_is_valid_access(int off, int size, enum bpf_access_type type, in pe_prog_is_valid_access() argument
1659 if (off % size != 0) { in pe_prog_is_valid_access()
1662 if (size != 8) in pe_prog_is_valid_access()
1664 if (off % size != 4) in pe_prog_is_valid_access()
1671 if (!bpf_ctx_narrow_access_ok(off, size, size_u64)) in pe_prog_is_valid_access()
1676 if (!bpf_ctx_narrow_access_ok(off, size, size_u64)) in pe_prog_is_valid_access()
1680 if (size != sizeof(long)) in pe_prog_is_valid_access()