[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] x86: gnttab_clear_flag() abusing clear_bit()



Back in c/s 17194:af33f2054f47 bitops got restricted to 4-bytes and
larger operands only. gnttab_clear_flag() cheats in casting a uint16_t *
to unsigned long * - how is that not a problem in the context of the
goal that said c/s set, in particular for v2 of the interface? (Given that
this is being implemented as arch-specific routine - so far for reasons
that escape me - this should be simple to fix by using inline assembly
rather than clear_bit().)

Further I just spotted one instance where the or of two bit positions
gets passed to this function - that's quite definitely a bug I would say.

And, quite the opposite, __fixup_status_for_pin() ands out the
negation of bit positions rather than masks... (Which also raises
the question whether it really would need to be clear_bit() above
instead of the cheaper __clear_bit().)

Thanks, Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.