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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <45F18A8C.6020209@s5r6.in-berlin.de>
Date:	Fri, 09 Mar 2007 17:25:48 +0100
From:	Stefan Richter <stefanr@...6.in-berlin.de>
To:	"Robert P. J. Day" <rpjday@...dspring.com>
CC:	Artem Bityutskiy <dedekind@...dex.ru>,
	Randy Dunlap <randy.dunlap@...cle.com>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: the usage of DEBUG_DRIVER seems ambiguous

Robert P. J. Day wrote:
> On Fri, 9 Mar 2007, Artem Bityutskiy wrote:
>> Randy Dunlap wrote:
>> > The ones in drivers/net/ are just local driver debug controls.
>> > They happen to have the same name as a (likely newer) kconfig symbol.
>> >
>> > Is there a real problem that needs to be fixed?
>>
>> Renaming them just for the sake of being less confusing makes sense.
...
> if someone wants to make a suggestion, i can submit a simple renaming
> patch.

If a driver or subsystem already uses a prefix to have an own namespace
for macros, functions, structs and so on, a local DEBUG_DRIVER could
become something like LOCALPREFIX_DEBUG. If there is a narrow usage of
the macro, e.g. to indicate a debug level, it could become something
speaking like LOCALPREFIX_DEBUG_LEVEL. --- However, after looking at the
actual occurrences of DEBUG_DRIVER, I see that this recommendation
doesn't really apply that well.

>From your initial post:
| $ $ grep -rw DEBUG_DRIVER *
| drivers/net/sunlance.c:#undef DEBUG_DRIVER

This is an old forgotten rest of earlier debug code. See here for evidence:
http://lxr.linux.no/source/drivers/net/sunlance.c?v=2.2.26#L791
791 #ifdef DEBUG_DRIVER
792         printk (KERN_DEBUG "Lance restart=%d\n", status);
793 #endif

This usage of DEBUG_DRIVER isn't there anymore. Therefore simply delete
the remaining occurrence:
-#undef DEBUG_DRIVER

| drivers/net/a2065.c:#ifdef DEBUG_DRIVER
| drivers/net/a2065.c:#ifdef DEBUG_DRIVER

Rename to A2065_DEBUG or LANCE_DEBUG. Two more alternatives:

-#ifdef DEBUG_DRIVER
+#if 0 /* debug */

or
-#ifdef DEBUG_DRIVER
-	years_old_debug_cruft_nobody_enables_anymore();
-#endif

Needless to say, the maintainer certainly wants to ACK/NAK this.

| drivers/net/7990.c:#ifdef DEBUG_DRIVER
| drivers/net/7990.c:#ifdef DEBUG_DRIVER

Exactly like with a2065.c.

| drivers/base/Kconfig:config DEBUG_DRIVER

According to where it is defined, CONFIG_DEBUG_DRIVER should only occur
in drivers/base/* (and some defconfigs outside of drivers/base/).

| ...

More hits from LXR:

drivers/isdn/hardware/eicon/dbgioctl.h

Where is this header file used anyway? Can the entire file be deleted?

drivers/isdn/gigaset/gigaset.h  (definition as enum item)
drivers/isdn/gigaset/common.c   (multiple uses)

If the overlap with CONFIG_DEBUG_DRIVER bothers you, rename it to
DEBUG_DRIVER_STRUCT or whatever.
-- 
Stefan Richter
-=====-=-=== --== --===
http://arcgraph.de/sr/
-
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