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:	Tue, 5 Jun 2007 16:29:30 +1000
From:	Herbert Xu <herbert@...dor.apana.org.au>
To:	David Miller <davem@...emloft.net>
Cc:	netdev@...r.kernel.org
Subject: Re: [2/4] [IPV4]: Convert IPv4 devconf to an array

On Mon, Jun 04, 2007 at 11:17:54PM -0700, David Miller wrote:
> 
> These array indexes are off by one.

Good catch.  I'll repost this.

> This is the danger in using this "x-1" indexing style.
> Such a mistake is way too easy to make.

Yes, unfortunately the NET_IPV4_* constants are exposed to user-space
so I can't easily change them.  Inventing a new set of constants didn't
seem to be worthwhile.  The other option would be to keep the symbolic
names with a union or explicit pointer calculations for the bitmap, but
this seemed to me to be the least ugly of all the alternatives.

If it's any consolation, this should be the only spot where we use
these constants directly.

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@...dor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
-
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