Re: [PATCH bpf-next v3] bpf: Propagate stack bounds to registers in atomics w/ BPF_FETCH

2021-02-03 Thread Alexei Starovoitov
On Wed, Feb 3, 2021 at 9:07 AM Yonghong Song wrote: > > > > On 2/2/21 5:50 AM, Brendan Jackman wrote: > > When BPF_FETCH is set, atomic instructions load a value from memory > > into a register. The current verifier code first checks via > > check_mem_access whether we can access the memory, and

Re: [PATCH bpf-next v3] bpf: Propagate stack bounds to registers in atomics w/ BPF_FETCH

2021-02-03 Thread Yonghong Song
On 2/2/21 5:50 AM, Brendan Jackman wrote: When BPF_FETCH is set, atomic instructions load a value from memory into a register. The current verifier code first checks via check_mem_access whether we can access the memory, and then checks via check_reg_arg whether we can write into the

[PATCH bpf-next v3] bpf: Propagate stack bounds to registers in atomics w/ BPF_FETCH

2021-02-02 Thread Brendan Jackman
When BPF_FETCH is set, atomic instructions load a value from memory into a register. The current verifier code first checks via check_mem_access whether we can access the memory, and then checks via check_reg_arg whether we can write into the register. For loads, check_reg_arg has the side-effect