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] [day] [month] [year] [list]
Message-ID: <18218.44709.383144.771700@cargo.ozlabs.ibm.com>
Date:	Fri, 2 Nov 2007 15:59:17 +1100
From:	Paul Mackerras <paulus@...ba.org>
To:	Jan Kara <jack@...e.cz>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: Differences in bitops argument types

Jan Kara writes:

>   I've just found out that operations like constant_test_bit() take pointer
> of different types on different architectures. In particular, x86_64,
> blackfin and frv take void * while i386, s390 and m68k take unsigned long
> *. Is this intended difference? Wouldn't using void * everywhere be more
> appropriate? Thanks for answer in advance.

A bitmap is defined to be an array of unsigned longs.  Using an array
of a smaller or longer type will give different results on big-endian
architectures.  Therefore using unsigned long * is better, because it
finds errors where callers are using an array of some other type.

Paul.
-
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