[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] xen: arm: correct use of find_next_bit
On Fri, 2014-01-24 at 14:48 +0000, Ian Campbell wrote: > On Fri, 2014-01-24 at 14:36 +0000, Julien Grall wrote: > > On 01/24/2014 02:23 PM, Ian Campbell wrote: > > > find_next_bit takes a "const unsigned long *" but forcing a cast of an > > > "uint32_t *" throws away the alignment constraints and ends up causing an > > > alignment fault on arm64 if the input happened to be 4 but not 8 byte > > > aligned. > > > > > > Instead of casting use a temporary variable of the right type. > > > > > > I've had a look around for similar constructs and the only thing I found > > > was > > > maintenance_interrupt which cases a uint64_t down to an unsigned long, > > > which > > > although perhaps not best advised is safe I think. > > > > > > This was observed with the AArch64 Linaro toolchain 2013.12 but I think > > > that > > > is just coincidental due to subtle changes to the stack layout etc. > > > > > > Reported-by: Fu Wei <fu.wei@xxxxxxxxxx> > > > Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx> > > > > Good catch! Do you plan to apply this patch for Xen 4.4? > > Yes, I think it is a suitable bug fix. Applied, thanks. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |