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>] [day] [month] [year] [list]
Message-ID: <aa943a2f-61aa-3210-61da-a2bf734ee6a3@canonical.com>
Date:   Wed, 18 Sep 2019 13:07:01 +0100
From:   Colin Ian King <colin.king@...onical.com>
To:     Jes Sorensen <jes@...ined-monkey.or>,
        "David S. Miller" <davem@...emloft.net>,
        "open list:HIPPI" <linux-hippi@...site.dk>, netdev@...r.kernel.org
Cc:     linux-kernel@...r.kernel.org
Subject: hippi: dead code issue on skb->data DMA limitations check

Hi there,

Static analysis with Coverity has detected an issue in  rr_init1() in
drivers/net/hippi/rrunner.c as follows:

   CID 13516 (#1 of 1): Operands don't affect result
(CONSTANT_EXPRESSION_RESULT)

result_independent_of_operands: ((unsigned long)skb->data & 4095) >
18446744073709486295UL /* ~0xff28 */ is always false regardless of the
values of its operands. This occurs as the logical operand of if.

653                /*
654                 * Sanity test to see if we conflict with the DMA
655                 * limitations of the Roadrunner.
656                 */
657                if ((((unsigned long)skb->data) & 0xfff) > ~65320)

   CID 14371: Logically dead code (DEADCODE)

658                        printk("skb alloc error\n");
659

Given that this check is currently dead code and it's been in the driver
for ages, should we just throw this check away or fix it? I'm not
entirely sure what the original intent was, so I'm not clear on a fix.

Colin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ