lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ecd92556-cc7e-ac2d-4d44-c71b7591c22e@netronome.com>
Date:   Tue, 26 Mar 2019 19:45:09 +0000
From:   Jiong Wang <jiong.wang@...ronome.com>
To:     Jann Horn <jannh@...gle.com>
Cc:     Alexei Starovoitov <alexei.starovoitov@...il.com>,
        Daniel Borkmann <daniel@...earbox.net>, bpf@...r.kernel.org,
        Network Development <netdev@...r.kernel.org>,
        oss-drivers@...ronome.com
Subject: Re: [PATCH/RFC bpf-next 02/16] bpf: refactor propagate_live
 implementation

On 26/03/2019 18:26, Jann Horn wrote:
> On Tue, Mar 26, 2019 at 7:07 PM Jiong Wang <jiong.wang@...ronome.com> wrote:
>> Some code inside current implementation of "propagate_liveness" is a little
>> bit verbose.
>>
>> This patch refactor them so the code looks more simple and more clear.
>>
>> The redundant usage of "vparent->frame[vstate->curframe]" is removed as we
>> are here. It is safe to do this because "state_equal" has guaranteed that
>> vstate->curframe must be equal with vparent->curframe.
> [...]
>> @@ -6050,6 +6050,22 @@ static bool states_equal(struct bpf_verifier_env *env,
>>          return true;
>>   }
>>
>> +static int propagate_liveness_reg(struct bpf_verifier_env *env,
>> +                                 struct bpf_reg_state *reg,
>> +                                 struct bpf_reg_state *parent_reg, u8 flag)
> This function takes four arguments...
>
> [...]
>> @@ -6071,16 +6088,13 @@ static int propagate_liveness(struct bpf_verifier_env *env,
> [...]
>> +               err = propagate_liveness_reg(env, &regs[i], &parent_regs[i]);
> .. but both here...
>
> [...]
>> @@ -6089,11 +6103,13 @@ static int propagate_liveness(struct bpf_verifier_env *env,
> [...]
>> +                       err = propagate_liveness_reg(env, reg, parent_reg);
> ... and here you only pass in three arguments? Does this compile?

Yes, it compiles. It is fixed in patch 03/16...

I was doing some simplification on 03/16, then found it's better
to be put into 02/16, and forget to update the function prototype there,

apology for this.

Regards,
Jiong

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ