[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.
>>> Konrad Rzeszutek Wilk <konrad@xxxxxxxxxx> 04/06/16 4:42 PM >>> >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? The lack of sort_exception_table() would be easy to deal with, but I indeed overlooked the sizeof(). So I agree with you and Andrew that the conditionals should stay, but I'd like them to be inverted (i.e. test for !ARM). Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |