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

Re: [Xen-devel] [PATCH] x86: fix variable_test_bit() asm constraints


  • To: Jan Beulich <jbeulich@xxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxx>
  • From: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
  • Date: Fri, 14 Mar 2008 11:59:19 +0000
  • Delivery-date: Fri, 14 Mar 2008 05:00:29 -0700
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>
  • Thread-index: AciFyj1lfDqkJfG9EdyPnAAWy6hiGQAAJf+H
  • Thread-topic: [Xen-devel] [PATCH] x86: fix variable_test_bit() asm constraints

On 14/3/08 11:55, "Keir Fraser" <keir.fraser@xxxxxxxxxxxxx> wrote:

>> Further, using 'void *' for the 'addr' parameter appears dangerous,
>> since bt{,c,r,s} access the full 32 bits (if 'unsigned long' was used
>> properly here, 64 bits for x86-64) pointed at, so invalid uses like
>> referencing a 'char' array cannot currently be caught.
> 
> Sure, but those invalid uses do exist, in x86-specific Xen code we inherited
> from Linux (perhaps older versions of Linux though). I don't want a huge patch
> that casts a large number of callers!

I see what you mean though: what if one of these bogus users' fields is
adjacent to a legitimate byte-sized atomic variable (e.g., a bool_t)?
Perhaps we do need to fix this, and properly without casts.

 -- Keir



_______________________________________________
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®.