From mboxrd@z Thu Jan 1 00:00:00 1970 From: Keir Fraser Subject: Re: [PATCH] x86: fix variable_test_bit() asm constraints Date: Fri, 14 Mar 2008 12:06:40 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Jan Beulich , xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On 14/3/08 11:55, "Keir Fraser" 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