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: <2314E505-27E8-4FA7-8034-4CE3F6CAA138@dilger.ca>
Date:	Wed, 20 Jun 2012 08:14:21 -0600
From:	Andreas Dilger <adilger@...ger.ca>
To:	Tony Breeds <tony@...eyournoodle.com>
Cc:	Ted Ts'o <tytso@....edu>, linux-ext4@...r.kernel.org
Subject: Re: Minimal configuration for e2fsprogs

On 2012-06-19, at 11:26 PM, Tony Breeds wrote:
> From 5f6a6528c93ad9b3eb878afbeab10c01802647b0 Mon Sep 17 00:00:00 2001
> From: Tony Breeds <tony@...eyournoodle.com>
> Date: Wed, 20 Jun 2012 15:04:43 +1000
> Subject: [PATCH] WiP: Add --disable-mmp
> 
> Signed-off-by: Tony Breeds <tony@...eyournoodle.com>
> ---
> configure.in         |   17 +++++++++++++++++
> debugfs/debugfs.c    |    5 +++++
> debugfs/set_fields.c |    5 +++++
> lib/config.h.in      |    3 +++
> lib/ext2fs/ext2fs.h  |   23 ++++++++++++-----------
> lib/ext2fs/mmp.c     |   24 ++++++++++++++++++++++++
> 6 files changed, 66 insertions(+), 11 deletions(-)
> 
> diff --git a/lib/ext2fs/mmp.c b/lib/ext2fs/mmp.c
> index bb3772d..a783698 100644
> --- a/lib/ext2fs/mmp.c
> +++ b/lib/ext2fs/mmp.c
> @@ -33,6 +33,9 @@
> 
> errcode_t ext2fs_mmp_read(ext2_filsys fs, blk64_t mmp_blk, void *buf)
> {
> +#ifndef CONFIG_MMP
> +	return EXT2_ET_OP_NOT_SUPPORTED;
> +#endif
> 	struct mmp_struct *mmp_cmp;
> 	errcode_t retval = 0;

I suspect that this will cause warnings from code analysis tools about
dead code, and bloat the code if the compiler isn't optimizing heavily.
Better to put the whole function body inside "#ifdef CONFIG_MMP" and
the "return EXT2_ET_OP_NOT_SUPPORTED" in the #else clause.

Cheers, Andreas






Download attachment "PGP.sig" of type "application/pgp-signature" (236 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ