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

[Xen-devel] [PATCH 00/20] livepatch-build-tools: new features and fixes

This series introduces new features to the livepatch functionality as
briefly discussed during Xen Developer Summit 2019: [a] and [b].
It also provides a few fixes and some small improvements.


1. Ignore build system object files: [2]

2. Allow using symlink names for hotpatch modules: [3]

  Some build systems may want to use symlinks' names for resulting
  hotpatch modules.
3. Include for processing all newly created object files, resulting
   from building an applied patch: [4]

  This allows to add new code from within additional, patch-provided
  files. It's very useful for inline asm hotpatching as well as for
  introducing new functionality.

4. Add helper functions to unify handling of the common sections:
   [5], [6], [7], [9]

5. Detect and purge undefined symbols from resulting object files:
   [12], [13]

  This prevents the undefined symbols sneak into the resulting modules.
  It's especially useful when building stacked hotpatch modules, where
  each consecutive module is based on a previous one.

6. Strip redundant or transient symbols from resulting object files:
   [19], [20]

  This change limits the size of resulting modules by dropping unneeded


1. Make livepatch-gcc work with various gcc command name: [1]
2. Detect special sections' entry sizes automatically by
   analyzing xen-syms: [8]

  Instead of hard-coding group entry sizes, detect them the same way
  linux kernel's kpatch does.
  This fixes building hotpatch modules for recent Xen, where one of
  the special section's entry sizes changed.

3. Filter out redundant strings from .rodata sections: [10]

  This change limits the size of resulting modules by dropping unneeded


For details see cover letter of xen series: [c]

1. independent modules (patches: [14])
2. pre- and post- apply|revert actions hooks (patches: [15])
3. apply|revert actions replacement hooks (patches: [11], [16], [17])
4. inline asm hotpatching expectations (patches: [18])

[b] https://lists.xenproject.org/archives/html/xen-devel/2019-07/msg00846.html

[c] [PATCH 00/14] livepatch: new features and fixes

Pawel Wieczorkiewicz (20):
  [1] livepatch-gcc: Allow toolchain command with versions
  [2] livepatch-gcc: Ignore built_in.o and prelink.o object files
  [3] livepatch-build: Do not follow every symlink for patch file
  [4] livepatch-build: Handle newly created object files
  [5] common: Add is_standard_section() helper function
  [6] common: Add is_referenced_section() helper function
  [7] create-diff-object: Add is_special_section() helper function
  [8] livepatch-build: detect special section group sizes
  [9] create-diff-object: Add new entries to special sections array
  [10] create-diff-object: Do not include all .rodata sections
  [11] create-diff-object: Do not create empty .livepatch.funcs section
  [12] create-diff-object: Extend patchability verification: STN_UNDEF
  [13] create-diff-object: Strip all undefined entires of known size
  [14] livepatch-build: Embed hypervisor build id into every hotpatch
  [15] create-diff-object: Handle extra pre-|post- hooks
  [16] create-diff-object: Handle optional apply|revert hooks
  [17] create-diff-object: Add support for applied/reverted marker
  [18] create-diff-object: Add support for expectations
  [19] livepatch-build: Strip transient or unneeded symbols
  [20] livepatch-build: Strip all metadata symbols from hotpatch modules

 common.c             |  35 ++++-
 common.h             |  16 +-
 create-diff-object.c | 425 ++++++++++++++++++++++++++++++++++++++++++++++-----
 livepatch-build      | 124 ++++++++++++++-
 livepatch-gcc        |   5 +-
 5 files changed, 564 insertions(+), 41 deletions(-)


Amazon Development Center Germany GmbH
Krausenstr. 38
10117 Berlin
Geschaeftsfuehrung: Christian Schlaeger, Ralf Herbrich
Eingetragen am Amtsgericht Charlottenburg unter HRB 149173 B
Sitz: Berlin
Ust-ID: DE 289 237 879

Xen-devel mailing list



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