Re: [PATCH v5 bpf-next 1/3] bpf: Add bpf_access_process_vm() helper

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jan 21, 2022 at 9:42 AM Kenny Yu <kennyyu@xxxxxx> wrote:
>
> Thanks for the suggestions! I'll go with the all-or-nothing approach to
> be consistent with `bpf_copy_from_user` and will make the following changes:
>
> * Return value: returns 0 on success, or negative error on failure.
> * If we had a partial read, we will memset the read bytes to 0 and return
>   -EFAULT

Not read bytes, but all bytes.
copy_from_user zeros leftover for us, but access_process_vm doesn't
do this on partial read.



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux