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: <20100118035759.GB8993@thunk.org>
Date:	Sun, 17 Jan 2010 22:57:59 -0500
From:	tytso@....edu
To:	Eric Sandeen <sandeen@...hat.com>
Cc:	"Aneesh Kumar K. V" <aneesh.kumar@...ux.vnet.ibm.com>,
	Ext4 Developers List <linux-ext4@...r.kernel.org>,
	Jiaying Zhang <jiayingz@...gle.com>
Subject: Re: [PATCH v4 1/3] ext4: mechanical change on dio get_block code
 in prepare for it to be used by buffer write

On Sun, Jan 17, 2010 at 10:19:30AM -0600, Eric Sandeen wrote:

> In addition to Aneesh's suggestions, I'm not sure of the value of
> creating more
> 
> #define FLAG_A = FLAG_B|FLAG_C
> 
> flag macros; unless you have this all in your head you just have to
> go look up the flag definition anyway, since we usually test individual
> flags not the aggregates.  I'm wondering if it might be better to just
> explicitly send in the OR'd flags rather than creating a new one, to
> see the code flow better.

I'd agree with that.  The other reason why it's good to avoid
aggregates is that if you don't realize that that FLAG_A is an
aggregate, you can end up doing this:

	if (flag & FLAG_A) {
		...
	}

and then be surprise when this tests true not just when someone passed
in FLAG_A, but also if someone passes in FLAG_B or FLAG_C...

   	       	       	       	      	 - Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ