[PATCH bpf-next] bpf: Fix register equivalence tracking.

2020-10-14 Thread Alexei Starovoitov
From: Alexei Starovoitov The 64-bit JEQ/JNE handling in reg_set_min_max() was clearing reg->id in either true or false branch. In the case 'if (reg->id)' check was done on the other branch the counter part register would have reg->id == 0 when called into find_equal_scalars(). In such case the he

Re: [PATCH bpf-next] bpf: Fix register equivalence tracking.

2020-10-14 Thread Andrii Nakryiko
On Wed, Oct 14, 2020 at 10:59 AM Alexei Starovoitov wrote: > > From: Alexei Starovoitov > > The 64-bit JEQ/JNE handling in reg_set_min_max() was clearing reg->id in > either > true or false branch. In the case 'if (reg->id)' check was done on the other > branch the counter part register would ha

Re: [PATCH bpf-next] bpf: Fix register equivalence tracking.

2020-10-14 Thread John Fastabend
Andrii Nakryiko wrote: > On Wed, Oct 14, 2020 at 10:59 AM Alexei Starovoitov > wrote: > > > > From: Alexei Starovoitov > > > > The 64-bit JEQ/JNE handling in reg_set_min_max() was clearing reg->id in > > either > > true or false branch. In the case 'if (reg->id)' check was done on the other > >

Re: [PATCH bpf-next] bpf: Fix register equivalence tracking.

2020-10-14 Thread Alexei Starovoitov
On Wed, Oct 14, 2020 at 09:04:23PM -0700, John Fastabend wrote: > Andrii Nakryiko wrote: > > On Wed, Oct 14, 2020 at 10:59 AM Alexei Starovoitov > > wrote: > > > > > > From: Alexei Starovoitov > > > > > > The 64-bit JEQ/JNE handling in reg_set_min_max() was clearing reg->id in > > > either > > >

Re: [PATCH bpf-next] bpf: Fix register equivalence tracking.

2020-10-14 Thread John Fastabend
Alexei Starovoitov wrote: > On Wed, Oct 14, 2020 at 09:04:23PM -0700, John Fastabend wrote: > > Andrii Nakryiko wrote: > > > On Wed, Oct 14, 2020 at 10:59 AM Alexei Starovoitov > > > wrote: > > > > > > > > From: Alexei Starovoitov > > > > > > > > The 64-bit JEQ/JNE handling in reg_set_min_max() w

Re: [PATCH bpf-next] bpf: Fix register equivalence tracking.

2020-10-14 Thread Alexei Starovoitov
On Wed, Oct 14, 2020 at 09:27:17PM -0700, John Fastabend wrote: > Alexei Starovoitov wrote: > > On Wed, Oct 14, 2020 at 09:04:23PM -0700, John Fastabend wrote: > > > Andrii Nakryiko wrote: > > > > On Wed, Oct 14, 2020 at 10:59 AM Alexei Starovoitov > > > > wrote: > > > > > > > > > > From: Alexei S

Re: [PATCH bpf-next] bpf: Fix register equivalence tracking.

2020-10-14 Thread John Fastabend
Alexei Starovoitov wrote: > On Wed, Oct 14, 2020 at 09:27:17PM -0700, John Fastabend wrote: > > Alexei Starovoitov wrote: > > > On Wed, Oct 14, 2020 at 09:04:23PM -0700, John Fastabend wrote: > > > > Andrii Nakryiko wrote: > > > > > On Wed, Oct 14, 2020 at 10:59 AM Alexei Starovoitov > > > > > wro

Re: [PATCH bpf-next] bpf: Fix register equivalence tracking.

2020-10-14 Thread Yonghong Song
On 10/14/20 10:56 AM, Alexei Starovoitov wrote: From: Alexei Starovoitov The 64-bit JEQ/JNE handling in reg_set_min_max() was clearing reg->id in either true or false branch. In the case 'if (reg->id)' check was done on the other branch the counter part register would have reg->id == 0 when

Re: [PATCH bpf-next] bpf: Fix register equivalence tracking.

2020-10-14 Thread Yonghong Song
On 10/14/20 10:46 PM, Yonghong Song wrote: On 10/14/20 10:56 AM, Alexei Starovoitov wrote: From: Alexei Starovoitov The 64-bit JEQ/JNE handling in reg_set_min_max() was clearing reg->id in either true or false branch. In the case 'if (reg->id)' check was done on the other branch the co

Re: [PATCH bpf-next] bpf: Fix register equivalence tracking.

2020-10-15 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to bpf/bpf-next.git (refs/heads/master): On Wed, 14 Oct 2020 10:56:08 -0700 you wrote: > From: Alexei Starovoitov > > The 64-bit JEQ/JNE handling in reg_set_min_max() was clearing reg->id in > either > true or false branch. In the case 'if (reg->id)' check was don