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

Re: [Xen-devel] Grant access to more than one dom



On 05/08/2014 04:03 PM, Simon Martin wrote:
Thanks Daniel,


The add_grefs function strings the allocated gntalloc_gref structures onto
two linked lists: the list heads are local, but are only used temporarily.
If the operation is successful, the list_splice_tail calls wire up the
linked lists to permanent structures on the heap; if unsuccessful, they
are used to clean up.

After sending the mail I kind of worked out the what, however the how
still bugs me. The function list_splice_tail does pointer juggling,
not allocation, so as far as I can see you just end up with pointers to
stack variables...


The allocation is done ingref = kzalloc(sizeof(*gref), GFP_KERNEL).  Any
pointers to stack variables are overwritten during the splice.

--
Daniel De Graaf
National Security Agency

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