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]
Message-ID: <20080524185201.GZ2638@parisc-linux.org>
Date:	Sat, 24 May 2008 12:52:01 -0600
From:	Matthew Wilcox <matthew@....cx>
To:	Arjan van de Ven <arjan@...radead.org>
Cc:	Mariusz Kozlowski <m.kozlowski@...land.pl>,
	kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: some numbers on macros

On Sat, May 24, 2008 at 09:33:50AM -0700, Arjan van de Ven wrote:
> unused macros in common header files are an indication of stale APIs
> otoh.. and might be of some interest. (Same for static inline in
> headers)

Possibly.  There's likely to be a lot of macros unused like these ones:

#define  PCI_X_CMD_MAX_READ     0x000c  /* Max Memory Read Byte Count */
                                /* Max # of outstanding split transactions */
#define  PCI_X_CMD_SPLIT_1      0x0000  /* Max 1 */
#define  PCI_X_CMD_SPLIT_2      0x0010  /* Max 2 */
#define  PCI_X_CMD_SPLIT_3      0x0020  /* Max 3 */
...

where the macros embody the PCI specification in code -- possibly we
don't use them yet, but if we ever did, we'd have the macros to use.

Another category of false positive is macros that ought to be used,
but the code that ought to be using them has decided to go its own way.
That still indicates a bug, but not the one you might initially think.

In summary, this is probably an interesting exercise, but the results
would need to be interpreted with care.

-- 
Intel are signing my paycheques ... these opinions are still mine
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours.  We can't possibly take such
a retrograde step."
--
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