]> xenbits.xensource.com Git - livepatch-build-tools.git/log
livepatch-build-tools.git
8 years agoRename of xSplice to LivePatch.
Konrad Rzeszutek Wilk [Thu, 2 Jun 2016 20:27:27 +0000 (16:27 -0400)]
Rename of xSplice to LivePatch.

s/xsplice/livepatch/
s/XSPLICE/LIVEPATCH/
s/xSplice/LivePatch/

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
8 years agoxsplice-build-tools: replace realpath with readlink in xsplice-build
Dongli Zhang [Sat, 28 May 2016 01:16:58 +0000 (09:16 +0800)]
xsplice-build-tools: replace realpath with readlink in xsplice-build

Replace realpath with readlink since '-m' option is not supported by realpath.

Signed-off-by: Dongli Zhang <dongli.zhang@oracle.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
8 years agoRequire --depends
Ross Lagerwall [Tue, 10 May 2016 12:58:14 +0000 (13:58 +0100)]
Require --depends

WIth the version of xSplice in Xen 4.7, the build-id dependency is required,
so require the option.

8 years agoUpdate the layout of xsplice_patch_func
Ross Lagerwall [Mon, 9 May 2016 10:21:22 +0000 (11:21 +0100)]
Update the layout of xsplice_patch_func

Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
8 years agoFix patching functions which use __func__
Ross Lagerwall [Mon, 9 May 2016 10:19:54 +0000 (11:19 +0100)]
Fix patching functions which use __func__

If __func__ is used, it generates a symbol like __func__.5432
Since this is always included (see is_special_static), it will generate
duplicate symbol conflicts if GCC happens to use the same number (which
happens quite often since it doesn't appear to be random). To work
around this, rename the symbol to use a completely random number.

Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
8 years agoUpdate format of .xsplice.depends section
Ross Lagerwall [Mon, 9 May 2016 09:08:02 +0000 (10:08 +0100)]
Update format of .xsplice.depends section

.xsplice.depends is expected to contain an ELF note, not a plain binary
checksum.

9 years agoUpdate xsplice_patch_func layout
Ross Lagerwall [Wed, 20 Jan 2016 14:11:36 +0000 (14:11 +0000)]
Update xsplice_patch_func layout

Update the structure layout to match the most recent hypervisor version.

Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
9 years agoRevert "Add 64 bytes of padding to xsplice_patch_funcs structure"
Ross Lagerwall [Wed, 20 Jan 2016 13:48:46 +0000 (13:48 +0000)]
Revert "Add 64 bytes of padding to xsplice_patch_funcs structure"

This reverts commit be95e2474439fbdddcd347e7ea1bd3a842927351.
It doesn't match the hypervisor structure layout in the latest xsplice
code.

9 years agoBackport "handle reference to end of section"
Ross Lagerwall [Tue, 17 Nov 2015 08:06:41 +0000 (08:06 +0000)]
Backport "handle reference to end of section"

Backport fffbb85b811e21d92f4517e78ead5fb3373185e6:
    create-diff-object: handle reference to end of section
from upstream.

Also edit it to work with Xen's code because it is compiled with -fpic.

9 years agoBackport static variable correlation work from upstream
Ross Lagerwall [Fri, 13 Nov 2015 14:39:30 +0000 (14:39 +0000)]
Backport static variable correlation work from upstream

Backport 7c88c41cfe3d ("create-diff-object: rewrite static local
variable correlation logic") from kpatch.

9 years agoAdd more sections to be bundleable
Ross Lagerwall [Fri, 13 Nov 2015 14:39:04 +0000 (14:39 +0000)]
Add more sections to be bundleable

9 years agoRename xsplice back to kpatch for functions coming from kpatch
Ross Lagerwall [Fri, 13 Nov 2015 08:50:31 +0000 (08:50 +0000)]
Rename xsplice back to kpatch for functions coming from kpatch

To ease porting changes from kpatch, only use xsplice for the special
section names and for newly written functions but use the kpatch
namespace for ported functions.

9 years agoFor Xen, treat PLT32 relocations like PC32
Ross Lagerwall [Fri, 13 Nov 2015 08:33:44 +0000 (08:33 +0000)]
For Xen, treat PLT32 relocations like PC32

PLT32 relocations are only used because gcc doesn't support symbol
visibility for builtins like memcpy.

9 years agoBundle .data.rel.ro. and .data.rel.ro.local. sections
Ross Lagerwall [Fri, 13 Nov 2015 08:27:02 +0000 (08:27 +0000)]
Bundle .data.rel.ro. and .data.rel.ro.local. sections

.data.rel.ro(.local). sections are (local) read only data sections with
relocations.

For example:
static const struct hvm_mmio_handler *const
hvm_mmio_handlers[HVM_MMIO_HANDLER_NR] =
{
    &hpet_mmio_handler,
    &vlapic_mmio_handler,
    &vioapic_mmio_handler,
    &msixtbl_mmio_handler,
    &iommu_mmio_handler
};

Allow these sections to be bundled so that section symbols can be
replaced with normal symbols, preventing them from being needlessly
included.

9 years agoAdd support for signing payloads
Ross Lagerwall [Tue, 10 Nov 2015 10:31:55 +0000 (10:31 +0000)]
Add support for signing payloads

Use the module signing infrastructure from Linux 4.3-rc6 to allow
signing payloads.

Example:
$ cd sign
$ make
$ ./sign-file-wrapper /path/to/payload.xsplice

9 years agoMangle local symbols to match Xen's mangling
Ross Lagerwall [Mon, 9 Nov 2015 15:23:33 +0000 (15:23 +0000)]
Mangle local symbols to match Xen's mangling

9 years agoImplement run-time linking
Ross Lagerwall [Fri, 6 Nov 2015 12:55:25 +0000 (12:55 +0000)]
Implement run-time linking

Implement run-time linking and link at run-time by default. Still keep
the option to link at compile time.

9 years agoAllow specifying a build-id dependency
Ross Lagerwall [Thu, 5 Nov 2015 14:10:17 +0000 (14:10 +0000)]
Allow specifying a build-id dependency

Allow including a build-id on which the created patch module depends.
This will then be verified by the hypervisor during patch apply.

9 years agoAdd 64 bytes of padding to xsplice_patch_funcs structure
Ross Lagerwall [Tue, 3 Nov 2015 14:44:49 +0000 (14:44 +0000)]
Add 64 bytes of padding to xsplice_patch_funcs structure

This gives the hypervisor scratch space for undo buffers and possibly
other uses.

9 years agoInclude a build id in xsplice modules
Ross Lagerwall [Mon, 2 Nov 2015 13:36:43 +0000 (13:36 +0000)]
Include a build id in xsplice modules

The build id will in future be used to uniquely identify a module and
for module dependencies.

9 years agoAdd support for hooks and ignore functions and sections
Ross Lagerwall [Fri, 23 Oct 2015 11:31:47 +0000 (12:31 +0100)]
Add support for hooks and ignore functions and sections

9 years agoFix logging from common.c
Ross Lagerwall [Fri, 23 Oct 2015 09:56:11 +0000 (10:56 +0100)]
Fix logging from common.c

9 years agoAdd prelink tool
Ross Lagerwall [Tue, 20 Oct 2015 15:51:37 +0000 (16:51 +0100)]
Add prelink tool

To simplify matters, prelink against a xen-syms file at compile time to
avoid having to resolve symbols at runtime. Create a prelink tool to do
this. Split out the elf loading and saving code of create-diff-object.c
into a common file which is shared by create-diff-object and prelink.

9 years agoClean up code a bit
Ross Lagerwall [Tue, 20 Oct 2015 11:14:10 +0000 (12:14 +0100)]
Clean up code a bit

Make functions and variables static.
Remove trailing whitespace.
Remove unused functions.

9 years agoAdd space for reverting the each applied function
Ross Lagerwall [Tue, 20 Oct 2015 11:12:16 +0000 (12:12 +0100)]
Add space for reverting the each applied function

Add an undo buffer to each xsplice_patch_func object to making reverting
functions easy.

9 years agoFail if the function is too small to patch
Ross Lagerwall [Tue, 20 Oct 2015 10:52:20 +0000 (11:52 +0100)]
Fail if the function is too small to patch

9 years agoAdd support for specifying the path to xen-syms
Ross Lagerwall [Tue, 20 Oct 2015 09:55:16 +0000 (10:55 +0100)]
Add support for specifying the path to xen-syms

This allows linking against a different xen-syms from the original
built. This may be useful if the compile environment or source code is
slightly different.

9 years agoDon't create "reverse" patch modules
Ross Lagerwall [Tue, 13 Oct 2015 13:41:07 +0000 (14:41 +0100)]
Don't create "reverse" patch modules

9 years agoAdd project files
Ross Lagerwall [Mon, 12 Oct 2015 11:25:14 +0000 (12:25 +0100)]
Add project files

xsplice-build can build live patches for most XSAs. It is, however,
still prototype code.

Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>