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

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

 



On Wed, Jan 19, 2022 at 10:03 AM Kenny Yu <kennyyu@xxxxxx> wrote:
>
> +BPF_CALL_5(bpf_access_process_vm, void *, dst, u32, size,
> +          const void __user *, user_ptr, struct task_struct *, tsk,
> +          u32, flags)
> +{
> +       /* flags is not used yet */
> +       return access_process_vm(tsk, (unsigned long)user_ptr, dst, size, 0);
> +}

Though the 'flags' argument is unused the helper has to check
that it's zero and return -EINVAL otherwise.
If we don't do this we won't be able to change the behavior later
due to backward compatibility.



[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