]> xenbits.xensource.com Git - livepatch-build-tools.git/log
livepatch-build-tools.git
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>