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

Re: [Xen-devel] [PATCH v1 10/11] xsplice: Add support for exception tables



On 03.11.2015 19:16, Ross Lagerwall wrote:
> +#ifdef CONFIG_X86
> +unsigned long search_module_extables(unsigned long addr)
> +{
> +    struct payload *data;
> +    unsigned long ret;
> +
> +    /* No locking since this list is only ever changed during apply or revert
> +     * context. */

How do you make sure that no exception is triggered in the patching
process itself (also for future code changes)?

Could we use a lockless update on the list of module ex-tables?

> +    list_for_each_entry ( data, &applied_list, applied_list )
> +    {
> +        if ( !data->start_ex_table )
> +            continue;
> +        if ( !((void *)addr >= data->module_address &&
> +               (void *)addr < (data->module_address + data->core_text_size)))
> +            continue;
> +
> +        ret = search_one_extable(data->start_ex_table, data->stop_ex_table - 
> 1,
> +                                 addr);
> +        if ( ret )
> +            return ret;
> +    }
> +
> +    return 0;
> +}
> +#endif
> +

Martin

-- 

Amazon Development Center Germany GmbH
Krausenstr. 38
10117 Berlin
Geschaeftsfuehrer: Dr. Ralf Herbrich, Christian Schlaeger
Ust-ID: DE289237879
Eingetragen am Amtsgericht Charlottenburg HRB 149173 B


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