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: <20080422224309.GW108924158@sgi.com>
Date:	Wed, 23 Apr 2008 08:43:09 +1000
From:	David Chinner <dgc@....com>
To:	Denys Vlasenko <vda.linux@...glemail.com>
Cc:	David Chinner <dgc@....com>, Eric Sandeen <sandeen@...deen.net>,
	Adrian Bunk <bunk@...nel.org>,
	Alan Cox <alan@...rguk.ukuu.org.uk>,
	Shawn Bohrer <shawn.bohrer@...il.com>,
	Ingo Molnar <mingo@...e.hu>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Arjan van de Ven <arjan@...radead.org>,
	Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [PATCH] xfs: #define out unused parameters of xfs_bmap_add_free and xfs_btree_read_bufl

On Tue, Apr 22, 2008 at 01:20:54PM +0200, Denys Vlasenko wrote:
> Hi David,
> 
> xfs_bmap_add_free and xfs_btree_read_bufl functions
> use some of their parameters only in some cases
> (e.g. if DEBUG is defined, or on non-Linux OS :)
> 
> This patch removes these parameters using #define hack
> which makes them "disappear" without the need of uglifying
> every callsite with #ifdefs.

We don't use pre-processor hacks to hide function variables for different
config options.  The XFS header files are messy enough without adding
additional redefinitions of function types to them.

w.r.t xfs_bmap_add_free(), the correct thing to do is to factor the
debug code out into a different function that is only compiled
on debug kernels and remove all the debug checks from xfs_bmap_add_free().

As it is, I don't think that the change is worth the maintenance
cost for a few bytes of stack space in non-critical paths.

Cheers,

Dave.
-- 
Dave Chinner
Principal Engineer
SGI Australian Software Group
--
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