Re: [PATCH bpf-next 03/13] bpf: support readonly buffer in verifier

2020-07-15 Thread Alexei Starovoitov
On Wed, Jul 15, 2020 at 10:48 AM Yonghong Song wrote: > > > PTR_TO_TP_BUFFER was a quick hack for tiny scratch area. > > Here I think the verifier should be smart from the start. > > > The next patch populates bpf_ctx_arg_aux with hardcoded 0 and 1. > > imo that's too hacky. Helper definitions sho

Re: [PATCH bpf-next 03/13] bpf: support readonly buffer in verifier

2020-07-15 Thread Yonghong Song
On 7/13/20 4:25 PM, Alexei Starovoitov wrote: On Mon, Jul 13, 2020 at 09:17:42AM -0700, Yonghong Song wrote: Two new readonly buffer PTR_TO_RDONLY_BUF or PTR_TO_RDONLY_BUF_OR_NULL register states are introduced. These new register states will be used by later bpf map element iterator. New re

Re: [PATCH bpf-next 03/13] bpf: support readonly buffer in verifier

2020-07-13 Thread Alexei Starovoitov
On Mon, Jul 13, 2020 at 09:17:42AM -0700, Yonghong Song wrote: > Two new readonly buffer PTR_TO_RDONLY_BUF or > PTR_TO_RDONLY_BUF_OR_NULL register states > are introduced. These new register states will be used > by later bpf map element iterator. > > New register states share some similarity to >

[PATCH bpf-next 03/13] bpf: support readonly buffer in verifier

2020-07-13 Thread Yonghong Song
Two new readonly buffer PTR_TO_RDONLY_BUF or PTR_TO_RDONLY_BUF_OR_NULL register states are introduced. These new register states will be used by later bpf map element iterator. New register states share some similarity to PTR_TO_TP_BUFFER as it will calculate accessed buffer size during verificati