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

Re: [Xen-devel] [PATCH v5 15/28] xsplice: Add .xsplice.hooks functions and test-case



On 06.04.2016 04:42, Konrad Rzeszutek Wilk wrote:
> On Fri, Apr 01, 2016 at 09:50:31AM -0600, Jan Beulich wrote:
>>>>> On 24.03.16 at 21:00, <konrad.wilk@xxxxxxxxxx> wrote:
>>> From: Ross Lagerwall <ross.lagerwall@xxxxxxxxxx>
>>>
>>> Add hook functions which run during patch apply and patch revert.
>>> Hook functions are used by xsplice payloads to manipulate data structures
>>> during patching, etc.
>>
>> Since the added documentation here didn't enlighten me, I've gone
>> back to the design doc, and found a single trivial mentioning of hooks.
>> No example of what they would be useful for, nothing. Unless these
>> can be shown to be needed if any recent XSA fix would be converted
>> to an xSplice patch, I'd recommend dropping this for now.
> 
> I do like this for the test-case uses (and regression testing).
> 
> The normal use-case is to modify structures values where we have to
> be delicate about it and can't just replace the value. As in we
> may have to recompute the value.

Agree on the default use (e.g., for XSA 91).

If we have shadow variables, we also need an unload hook to garbage
collect all the variables introduced by a hotpatch to prevent memory
leaks.  Potentially, we also want to pre-reserve memory for static or
existing dynamic objects in the load-hook instead of on the fly.

For testing and debugging, various applications are possible.

In general, the hooks provide flexibility when having to deal with
unforeseen cases, but their application should be rarely required (<
10%).  I would argue that we can delay them until v2, together with the
shadow variables

Martin

Amazon Development Center Germany GmbH
Berlin - Dresden - Aachen
main office: 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®.