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

Re: [Xen-devel] [PATCH v5 17/28] xsplice: Add support for exception tables.



On Fri, Apr 01, 2016 at 10:06:54AM -0600, Jan Beulich wrote:
> >>> On 24.03.16 at 21:00, <konrad.wilk@xxxxxxxxxx> wrote:
> > --- a/xen/common/xsplice.c
> > +++ b/xen/common/xsplice.c
> > @@ -573,6 +573,25 @@ static int prepare_payload(struct payload *payload,
> >          region->frame[i].n_bugs = sec->sec->sh_size / sizeof(struct 
> > bug_frame);
> >      }
> >  
> > +#ifdef CONFIG_X86
> > +    sec = xsplice_elf_sec_by_name(elf, ".ex_table");
> > +    if ( sec )
> > +    {
> > +        if ( !sec->sec->sh_size ||
> > +             (sec->sec->sh_size % sizeof (struct exception_table_entry)) )
> > +        {
> > +            dprintk(XENLOG_DEBUG, "%s%s: Wrong size of .ex_table (exp:%lu 
> > vs %lu)!\n",
> > +                    XSPLICE, elf->name, sizeof (struct 
> > exception_table_entry),
> > +                    sec->sec->sh_size);
> > +            return -EINVAL;
> > +        }
> > +
> > +        region->ex = (struct exception_table_entry *)sec->load_addr;
> > +        region->ex_end = (struct exception_table_entry *)(sec->load_addr + 
> > sec->sec->sh_size);
> > +
> > +        sort_exception_table(region->ex, region->ex_end);
> > +    }
> > +#endif
> 
> Nothing here is really x86-specific, so the earlier comment on the
> conditionals better going away applies here too.

But there is no sort_exception_table on ARM, nor would the sizeof work
on ARM? Or are you saying I should add an .. empty function and
structure for this?

> 
> > --- a/xen/include/asm-x86/uaccess.h
> > +++ b/xen/include/asm-x86/uaccess.h
> > @@ -276,6 +276,11 @@ extern struct exception_table_entry 
> > __start___pre_ex_table[];
> >  extern struct exception_table_entry __stop___pre_ex_table[];
> >  
> >  extern unsigned long search_exception_table(unsigned long);
> > +extern unsigned long search_one_extable(const struct exception_table_entry 
> > *first,
> > +                                        const struct exception_table_entry 
> > *last,
> > +                                        unsigned long value);
> 
> I can't seem to find a use of the outside its defining file. Why is
> this being made global?
> 
> 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®.