On 26/09/2023 12:02, Zachary Leaf wrote:
[...]
@@ -4232,9 +4368,9 @@ static int bpf_prog_get_info_by_fd(struct file *file, } done:
- if (copy_to_user(uinfo, &info, info_len) ||
put_user(info_len, &uattr->info.info_len))
return -EFAULT;
- err = copy_bpf_prog_info_to_user(attr, uattr, &info, &info_len);
- if (err)
return err;
Nit: we could also keep if (copy_bpf_...()) return -EFAULT in such places, like in btf_get_info_by_fd().
Kevin