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, 07 Oct 2011 09:38:51 -0400
From:	Steven Rostedt <rostedt@...dmis.org>
To:	Dan Carpenter <dan.carpenter@...cle.com>
Cc:	Frederic Weisbecker <fweisbec@...il.com>,
	Ingo Molnar <mingo@...hat.com>, linux-kernel@...r.kernel.org,
	kernel-janitors@...r.kernel.org
Subject: Re: [patch] trace: cleanup: make some types unsigned

On Fri, 2011-10-07 at 16:27 +0300, Dan Carpenter wrote:
> The problem here is that I'm trying to silence a static checker
> warning.  In replace_preds() we cap n_preds at MAX_FILTER_PRED but
> we don't check for negative values.  It can't actually be negative
> values, but the static checkers get confused.

I really hate to uglify code for the sake of static checkers.

This code may change in the near future, and the possibility that
n_preds may become a possibility. Perhaps we should add a:

WARN_ON(n_preds < 0);

If in the future the count_preds() changes and incorrectly produces a
negative number, or perhaps even overflows int, we wont catch it with
unsigned.

-- Steve


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ