[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v9 17/27] xsplice: Add support for bug frames.
On 04/25/2016 04:35 PM, Konrad Rzeszutek Wilk wrote: snip diff --git a/xen/common/xsplice.c b/xen/common/xsplice.c index 72a3b88..11b19dd 100644 --- a/xen/common/xsplice.c +++ b/xen/common/xsplice.c @@ -123,6 +123,35 @@ static int verify_payload(const xen_sysctl_xsplice_upload_t *upload, char *n) return 0; } +bool_t is_patch(const void *ptr) +{ + const struct payload *data; + bool_t r = 0; + + /* + * Only RCU locking since this list is only ever changed during apply + * or revert context. And in case it dies there we need an safe list. + */ + rcu_read_lock(&rcu_applied_lock); + list_for_each_entry_rcu ( data, &applied_list, applied_list ) + { + if ( (ptr >= data->rw_addr && + ptr < (data->rw_addr + data->rw_size)) || + (ptr >= data->ro_addr && + ptr < (data->ro_addr + data->ro_size)) || + (ptr >= data->text_addr && + ptr < (data->text_addr + data->text_size)) ) The above 3 calculations are wrong due to the use of void *. -- Ross Lagerwall _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |