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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87ef3i9dbc.fsf@netronome.com>
Date:   Tue, 25 Jun 2019 11:20:07 +0100
From:   Jiong Wang <jiong.wang@...ronome.com>
To:     Yauheni Kaliuta <yauheni.kaliuta@...hat.com>
Cc:     Jiong Wang <jiong.wang@...ronome.com>,
        linux-kernel@...r.kernel.org, Jiri Olsa <jolsa@...hat.com>,
        Jiri Benc <jbenc@...hat.com>
Subject: Re: ebpf: BPF_ALU32 | BPF_ARSH on BE arches


Yauheni Kaliuta writes:

> Hi!
>
> Looks like the code:
>
>        ALU_ARSH_X:
>                DST = (u64) (u32) ((*(s32 *) &DST) >> SRC);
>                CONT;
>        ALU_ARSH_K:
>                DST = (u64) (u32) ((*(s32 *) &DST) >> IMM);
>                CONT;
>
> works incorrectly on BE arches since it must operate on lower
> parts of 64bit registers.
>
> See failure of test_verifier test 'arsh32 on imm 2' (#23 on
> 5.2-rc6).

Ah, thanks for reporting this.

Should not taken the address directly, does the following fix resolved the
failure?

        ALU_ARSH_X:
                DST = (u64) (u32) ((s32) DST) >> SRC);
                CONT;
        ALU_ARSH_K:
                DST = (u64) (u32) ((s32) DST) >> IMM);
                CONT;

Regards,
Jiong

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ