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

Re: [Xen-devel] [PATCH v8.1 14/27] xsplice, symbols: Implement symbol name resolution on address.



>>> On 21.04.16 at 15:56, <konrad@xxxxxxxxxx> wrote:
>> > So I did try that and it all worked nicely on x86. However on ARM32:
>> >
>> > arm <konrad@localhost:~/xen/xen> make -j8 1>1
>> > symbols.c: In function 'symbols_lookup_by_name':
>> > symbols.c:287:20: error: cast to pointer from integer of different size
>> > [-Werror=int-to-pointer-cast]
>> >
>> > 275     uint64_t addr = 0; /* MUST be initialized. */
>> >
>> >
>> > 286         if ( !strcmp(name, symname) )
>> >
>> > 287             return (void *)addr;
>> >
>> > Which is rather unfortunate. I think I will have to make it unsigned
>> > long.
>>
>> Well, why would any kind of address be uint64_t on ARM32?
>>
> 
> Oh, the xensyms_read - which is used in a hypercalls (for reading the
> symbols) as well - requires an pointer to an uint64_t as an argument. Hence
> the need for using that type.
> 
> I can certainly muck with it so that it can do xen_pfn_t.

Which also is a 64-bit type on ARM, and which would be really wrong
to use here. There's really no point in xensyms_read() taking other
than an unsigned long *, and if the sysctl wants a uint64_t, then it
should use a temporary variable to do the conversion.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

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