From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ross Lagerwall Subject: xsplice-build prototype (was [PATCH v1 1/5] xsplice: Design document.) Date: Mon, 12 Oct 2015 12:44:12 +0100 Message-ID: <561B9D0C.3090303@citrix.com> References: <1442437276-2620-1-git-send-email-konrad.wilk@oracle.com> <1442437276-2620-2-git-send-email-konrad.wilk@oracle.com> <561250C9.7040400@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZlbWm-0006g4-Jj for xen-devel@lists.xenproject.org; Mon, 12 Oct 2015 11:44:28 +0000 In-Reply-To: <561250C9.7040400@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: Konrad Rzeszutek Wilk , xen-devel@lists.xenproject.org, msw@amazon.com, aliguori@amazon.com, amesserl@rackspace.com, rick.harris@rackspace.com, paul.voccio@rackspace.com, steven.wilson@rackspace.com, major.hayden@rackspace.com, josh.kearney@rackspace.com, jinsong.liu@alibaba-inc.com, xiantao.zxt@alibaba-inc.com, boris.ostrovsky@oracle.com, daniel.kiper@oracle.com, elena.ufimtseva@oracle.com, bob.liu@oracle.com, lars.kurth@citrix.com, hanweidong@huawei.com, peter.huangpeng@huawei.com, fanhenglong@huawei.com, liuyingdong@huawei.com, john.liuqiming@huawei.com, jbeulich@suse.com, andrew.cooper3@citrix.com, mpohlack@amazon.com, ian.campbell@citrix.com List-Id: xen-devel@lists.xenproject.org On 10/05/2015 11:28 AM, Ross Lagerwall wrote: > On 09/16/2015 10:01 PM, Konrad Rzeszutek Wilk wrote: >> +### Generation of xSplice ELF payloads >> + >> +The design of that is not discussed in this design. >> + >> +The author of this design envisions objdump and objcopy along >> +with special GCC parameters (see above) to create .o.xsplice files >> +which can be used to splice an ELF with the new payload. >> + >> +The ksplice code can provide inspiration. >> + > > As discussed off-list with Konrad, I'm going to get started with > generation of the payload given a patch. > I've created a _prototype_ tool for this based on kpatch's tooling. It's currently living at https://github.com/rosslagerwall/xsplice-build With no source patch modifications, live patches can be built for every XSA that applies to x86 back to XSA-90 except for XSA-97, XSA-111, XSA-112, and XSA-114 (83% success rate). It gives plausible output for each generated patch although I obviously can't verify the live patches yet. It doesn't really follow the design in the above document; IMO the payload design is unnecessarily complicated. At this point I'd rather just get a complete working prototype, and we can figure out the specifics and finalize the design later. If no one else is working on it, I'm going to start the next steps which is: * Load the ELF binary into Xen memory. * Resolve symbols. * Perform ELF relocations I'll use Konrad's xsplice.v1.1 branch as a starting point to provide the hypervisor interface for this work. Thanks -- Ross Lagerwall