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]
Date:	Fri, 02 Nov 2007 14:27:17 -0700 (PDT)
From:	David Miller <davem@...emloft.net>
To:	chuck.lever@...cle.com
Cc:	netdev@...r.kernel.org
Subject: Re: [PATCH] NET: Remove unneeded type cast in skb_truesize_check()

From: Chuck Lever <chuck.lever@...cle.com>
Date: Fri, 02 Nov 2007 15:14:26 -0400

> The (int) type cast in skb_truesize_check() is unneeded: without it, all
> the variable types in the conditional expression are unsigned integers.  As
> it stands, the type cast causes a comparison between a signed and an
> unsigned integer, which can produce unexpected results.
> 
> Signed-off-by: Chuck Lever <chuck.lever@...cle.com>

This is checking for skb->truesize being decremented too much by other
code, which could cause a wraparound below zero, so we do want
negaitve checks here.

Please stop these mindless signedness conversions without first trying
to think about what the code might be trying to do.

Thank you.
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ