From mboxrd@z Thu Jan 1 00:00:00 1970 From: Martin Pohlack Subject: Re: [PATCH v1 10/11] xsplice: Add support for exception tables Date: Fri, 27 Nov 2015 17:28:34 +0100 Message-ID: <565884B2.2050400@amazon.com> References: <1446574568-9644-1-git-send-email-ross.lagerwall@citrix.com> <1446574568-9644-10-git-send-email-ross.lagerwall@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1446574568-9644-10-git-send-email-ross.lagerwall@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ross Lagerwall , xen-devel@lists.xen.org Cc: Andrew Cooper , Jan Beulich List-Id: xen-devel@lists.xenproject.org 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