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-next>] [day] [month] [year] [list]
Message-ID: <bcf97046-e336-712a-ac68-7fd194f2953e@gmail.com>
Date:   Mon, 24 Jul 2023 13:27:26 +0100
From:   "Colin King (gmail)" <colin.i.king@...il.com>
To:     Tiezhu Yang <yangtiezhu@...ngson.cn>
Cc:     Youling Tang <tangyouling@...ngson.cn>,
        Huacai Chen <chenhuacai@...ngson.cn>,
        loongarch@...ts.linux.dev,
        "bpf@...r.kernel.org >> bpf" <bpf@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: re: LoongArch: Add BPF JIT support

Hi,

Static analysis with clang scan build on arch/loongarch/net/bpf_jit.h 
has detected a potential issue with the following commit:

commit 5dc615520c4dfb358245680f1904bad61116648e
Author: Tiezhu Yang <yangtiezhu@...ngson.cn>
Date:   Wed Oct 12 16:36:20 2022 +0800

     LoongArch: Add BPF JIT support

This issue is as follows:

arch/loongarch/net/bpf_jit.h:153:23: warning: Logical disjunction always 
evaluates to true: imm_51_31 != 0 || imm_51_31 != 0x1fffff. 
[incorrectLogicOperator]
    if (imm_51_31 != 0 || imm_51_31 != 0x1fffff) {


The statement seems to be always true. I suspect it should it be instead:

    if (imm_51_31 != 0 && imm_51_31 != 0x1fffff) {

regards,

Colin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ