Re: [PATCH] bitmap parsing routines, version 3

From: William Lee Irwin III
Date: Sun Jan 18 2004 - 00:54:28 EST


On Sat, Jan 17, 2004 at 03:33:44PM -0800, Paul Jackson wrote:
> Having the various bitop routines cease treating the unused high bits as
> a garbage dump is a separate task. I don't like the way it is, as it
> seems to open the door for some random bugs, in case some hapless code
> is depending on these high bits in ways it shouldn't.
> This whole mechanism seems to have a design confusion - whether to
> specify and honor a specific bit count, or not.

There has never been any confusion. The slop bits are treated
consistently as "don't cares". The functions used to inspect the values,
bitmap_empty(), bitmap_full(), bitmap_equal(), and bitmap_weight(), all
properly check the boundary cases. The remaining functions clobber the
slop bits without hesitation in order to simplify the implementation,
as those bits are never examined by the inspection functions.

If those bits are ever examined and interpreted when they should not be,
I'd be far more interested in hearing about that than about don't cares
being clobbered when they are supposed to be.


-- wli
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/