On Sun, Sep 13, 2020 at 10:01 PM Hao Luo wrote:
>
> Thanks for review, Andrii.
>
> One question, should I add bpf_{per, this}_cpu_ptr() to the
> bpf_base_func_proto() in kernel/bpf/helpers.c?
Yes, probably, but given it allows poking at kernel memory, it
probably needs to be guarded by
Thanks for review, Andrii.
One question, should I add bpf_{per, this}_cpu_ptr() to the
bpf_base_func_proto() in kernel/bpf/helpers.c?
On Fri, Sep 4, 2020 at 1:04 PM Andrii Nakryiko
wrote:
>
> On Thu, Sep 3, 2020 at 3:35 PM Hao Luo wrote:
> >
> > Add bpf_per_cpu_ptr() to help bpf programs
On Thu, Sep 3, 2020 at 3:35 PM Hao Luo wrote:
>
> Add bpf_per_cpu_ptr() to help bpf programs access percpu vars.
> bpf_per_cpu_ptr() has the same semantic as per_cpu_ptr() in the kernel
> except that it may return NULL. This happens when the cpu parameter is
> out of range. So the caller must
Add bpf_per_cpu_ptr() to help bpf programs access percpu vars.
bpf_per_cpu_ptr() has the same semantic as per_cpu_ptr() in the kernel
except that it may return NULL. This happens when the cpu parameter is
out of range. So the caller must check the returned value.
Acked-by: Andrii Nakryiko
4 matches
Mail list logo