On Friday 14 July 2006 10:03 pm, James Morris wrote:
> On Fri, 14 Jul 2006, [EMAIL PROTECTED] wrote:
> > +/**
> > + * cipso_v4_bitmap_walk - Walk a bitmap looking for a bit
> >
> > + * cipso_v4_bitmap_setbit - Sets a single bit in a bitmap
>
> Can you use lib/bitmap.c instead?

Looking again at include/asm/bitops.h I think I now remember why I decided not 
to use them in the first place.  At least on the x86 side it looks like the 
underlying btsl instruction may access an entire word when the bitmap may 
only by a byte long.  I imagine in the practical sense it probably wouldn't 
be too serious of an issue, but there are too many corner cases here for me 
to be able to say for certain so I'll defer to the experts here.

If it is safe it shouldn't be too difficult to use the set/clear_bit() 
functions in cipso_v4_bitmap_setbit() and the find_*_bit() functions in 
cipso_v4_bitmap_walk().

As an aside, I've made the other changes you suggested but I won't have a 
chance to test them until Monday morning.  Assuming all goes well during some 
quick testing I'll post a new patchset around mid-day on Monday.

-- 
paul moore
linux security @ hp
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to