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

Re: [Xen-devel] [PATCH v4 07/34] arm/x86: Use struct virtual_region to do bug, symbol, and (x86) exception tables



>>> On 24.03.16 at 03:49, <konrad.wilk@xxxxxxxxxx> wrote:
>> > --- a/xen/common/symbols.c
>> > +++ b/xen/common/symbols.c
>> > @@ -17,6 +17,7 @@
>> >  #include <xen/lib.h>
>> >  #include <xen/string.h>
>> >  #include <xen/spinlock.h>
>> > +#include <xen/virtual_region.h>
>> >  #include <public/platform.h>
>> >  #include <xen/guest_access.h>
>> >  
>> > @@ -97,8 +98,7 @@ static unsigned int get_symbol_offset(unsigned long pos)
>> >  
>> >  bool_t is_active_kernel_text(unsigned long addr)
>> >  {
>> > -    return (is_kernel_text(addr) ||
>> > -            (system_state < SYS_STATE_active && 
>> > is_kernel_inittext(addr)));
>> > +    return !!search_virtual_regions(addr);
>> 
>> search_virtual_regions() doesn't sound like it would be looking for
>> text addresses only.
> 
> I am not sure what would be a better name - as it
> (search_virtual_regions) is used by three other callers?
> 
> search_for_addr? 

How would that make clear that you're after .text addresses only?
Part of the problem of course is that only .text regions get registered,
yet the function names all don't reflect this. Perhaps generally
s/virtual/text/ ?

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