Re: [PATCH bpf 1/2] bpf: support PTR_TO_MEM{,_OR_NULL} register spilling

2021-01-12 Thread Daniel Borkmann
On 1/12/21 8:46 PM, Andrii Nakryiko wrote: On Tue, Jan 12, 2021 at 1:14 AM Gilad Reti wrote: Add support for pointer to mem register spilling, to allow the verifier to track pointer to valid memory addresses. Such pointers are returned for example by a successful call of the bpf_ringbuf_reserv

Re: [PATCH bpf 1/2] bpf: support PTR_TO_MEM{,_OR_NULL} register spilling

2021-01-12 Thread Andrii Nakryiko
On Tue, Jan 12, 2021 at 1:14 AM Gilad Reti wrote: > > Add support for pointer to mem register spilling, to allow the verifier > to track pointer to valid memory addresses. Such pointers are returned > for example by a successful call of the bpf_ringbuf_reserve helper. > > This patch was suggested

Re: [PATCH bpf 1/2] bpf: support PTR_TO_MEM{,_OR_NULL} register spilling

2021-01-12 Thread KP Singh
On Tue, Jan 12, 2021 at 3:24 PM Gilad Reti wrote: > > On Tue, Jan 12, 2021 at 3:57 PM KP Singh wrote: > > > > On Tue, Jan 12, 2021 at 10:14 AM Gilad Reti wrote: > > > > > > Add support for pointer to mem register spilling, to allow the verifier > > > to track pointer to valid memory addresses. S

Re: [PATCH bpf 1/2] bpf: support PTR_TO_MEM{,_OR_NULL} register spilling

2021-01-12 Thread Gilad Reti
On Tue, Jan 12, 2021 at 3:57 PM KP Singh wrote: > > On Tue, Jan 12, 2021 at 10:14 AM Gilad Reti wrote: > > > > Add support for pointer to mem register spilling, to allow the verifier > > to track pointer to valid memory addresses. Such pointers are returned > > nit: pointers Thanks > > > for ex

Re: [PATCH bpf 1/2] bpf: support PTR_TO_MEM{,_OR_NULL} register spilling

2021-01-12 Thread KP Singh
On Tue, Jan 12, 2021 at 10:14 AM Gilad Reti wrote: > > Add support for pointer to mem register spilling, to allow the verifier > to track pointer to valid memory addresses. Such pointers are returned nit: pointers > for example by a successful call of the bpf_ringbuf_reserve helper. > > This pat

[PATCH bpf 1/2] bpf: support PTR_TO_MEM{,_OR_NULL} register spilling

2021-01-12 Thread Gilad Reti
Add support for pointer to mem register spilling, to allow the verifier to track pointer to valid memory addresses. Such pointers are returned for example by a successful call of the bpf_ringbuf_reserve helper. This patch was suggested as a solution by Yonghong Song. The patch was partially conti