On 30/10/2023 13:48, Zachary Leaf wrote:
diff --git a/include/linux/bpf.h b/include/linux/bpf.h index e056737bc823..119ed25eb5fc 100644 --- a/include/linux/bpf.h +++ b/include/linux/bpf.h @@ -67,6 +67,10 @@ extern bool bpf_global_ma_set; __bpf_put_uattr(x, (union compat_bpf_attr __user *)uattr, to_field) : \ __bpf_put_uattr(x, (union bpf_attr __user *)uattr, to_field)) +#define bpf_copy_to_user_with_ptr(dest, src, size) \
- (in_compat64_syscall() ? copy_to_user(dest, src, size) \
: copy_to_user_with_ptr(dest, src, size))
#define bpf_field_exists(uattr_size, field) \ (in_compat_syscall() ? \ (uattr_size >= offsetofend(union compat_bpf_attr, field)) : \ diff --git a/include/linux/bpfptr.h b/include/linux/bpfptr.h index 7fdf9692d76e..ffd54851f9c4 100644 --- a/include/linux/bpfptr.h +++ b/include/linux/bpfptr.h @@ -3,6 +3,7 @@ #ifndef _LINUX_BPFPTR_H #define _LINUX_BPFPTR_H +#include <linux/compat.h>
No longer needed.
Kevin