[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 04/08/2016 06:39 PM, Jan Beulich wrote:
On 08.04.16 at 17:57, <ross.lagerwall@xxxxxxxxxx> wrote:
On 04/07/2016 02:15 AM, Jan Beulich wrote:
Martin Pohlack <mpohlack@xxxxxxxxxx> 04/06/16 8:42 AM >>>
On 06.04.2016 04:42, Konrad Rzeszutek Wilk wrote:
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).

XSA-91 was an ARM one, i.e. would still only be a theoretical example for
the purpose of the discussion here.

I've marked the following XSAs as potentially requiring hook functions
or shadow variables:


Such a raw list doesn't tell me anything, I'm afraid. Can you please
explain for at least one of them why they do need hooks (and not
just potentially)?

Some examples:
XSA-80: In addition to patching the code, a hook function is needed to set iommu_dont_flush_iotlb back to 0.

XSA-82: The original patch applies to an __init function. Instead, use a hook function to update the MSR.

Of course, it requires someone with decent knowledge of the code area & source patch to determine exactly what needs to be done. But any patch which touches initialization code (__init or otherwise) or changes the layout or content of data (structs or static/global data) will either need the source patch to be rewritten and/or the use of hook functions/shadow variables. The XSAs I've listed above fall into this category.

Ross Lagerwall

Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.