Skip to contentSkip to conversation

xen: Rename of xSplice to livepatch.

PATCH Superseded Konrad Rzeszutek Wilk 5 participants 5 messages Jun 2, 2016

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xen: Rename of xSplice to livepatch.

Specifically:

s/\.xsplice/\.xlivepatch/
s/XSPLICE_OP/LIVEPATCH_OP/
s/XSPLICE/LIVE_PATCH/
s/xsplice/livepatch/
s/livepatch_patch_func/livepatch_func/
s/xSplice/Xen Live Patching/

And then modify some of the function arguments
to have two more characters. And lastly move the
header include to be in proper alphabetic order
(if the file has it in the first place).

---
Cc: Ross Lagerwall [email protected]
Cc: Andrew Cooper <[email protected]>
Cc: George Dunlap <[email protected]>
Cc: Ian Jackson <[email protected]>
Cc: Jan Beulich <[email protected]>
Cc: Konrad Rzeszutek Wilk <[email protected]>
Cc: Stefano Stabellini <[email protected]>
Cc: Tim Deegan <[email protected]>
Cc: Wei Liu <[email protected]>
Cc: Martin Pohlack <[email protected]>

---
 .gitignore                                         |   8 +-
 MAINTAINERS                                        |  20 +-
 docs/misc/{xsplice.markdown => livepatch.markdown} | 184 +++++-----
 tools/flask/policy/policy/modules/xen/xen.te       |   2 +-
 tools/libxc/include/xenctrl.h                      |  32 +-
 tools/libxc/xc_misc.c                              | 142 ++++----
 tools/misc/Makefile                                |   4 +-
 tools/misc/{xen-xsplice.c => xen-livepatch.c}      |  62 ++--
 xen/arch/arm/Makefile                              |   2 +-
 xen/arch/arm/livepatch.c                           |  79 +++++
 xen/arch/arm/xsplice.c                             |  79 -----
 xen/arch/x86/Makefile                              |   8 +-
 xen/arch/x86/alternative.c                         |  18 +-
 xen/arch/x86/domain.c                              |   4 +-
 xen/arch/x86/extable.c                             |   8 +-
 xen/arch/x86/{xsplice.c => livepatch.c}            |  56 ++--
 xen/arch/x86/test/Makefile                         |  58 ++--
 xen/arch/x86/test/xen_bye_world.c                  |   6 +-
 xen/arch/x86/test/xen_hello_world.c                |   6 +-
 xen/arch/x86/test/xen_replace_world.c              |   6 +-
 xen/arch/x86/traps.c                               |   2 +-
 xen/common/Kconfig                                 |  10 +-
 xen/common/Makefile                                |   4 +-
 xen/common/{xsplice.c => livepatch.c}              | 370 ++++++++++-----------
 xen/common/{xsplice_elf.c => livepatch_elf.c}      | 109 +++---
 xen/common/sysctl.c                                |   6 +-
 xen/common/virtual_region.c                        |   4 +-
 xen/common/vsprintf.c                              |   4 +-
 xen/include/asm-x86/current.h                      |   8 +-
 xen/include/public/sysctl.h                        | 138 ++++----
 xen/include/xen/elfstructs.h                       |   2 +-
 xen/include/xen/livepatch.h                        | 119 +++++++
 xen/include/xen/{xsplice_elf.h => livepatch_elf.h} |  35 +-
 xen/include/xen/xsplice.h                          | 119 -------
 xen/xsm/flask/hooks.c                              |   4 +-
 xen/xsm/flask/policy/access_vectors                |   4 +-
 36 files changed, 862 insertions(+), 860 deletions(-)
 rename docs/misc/{xsplice.markdown => livepatch.markdown} (87%)
 rename tools/misc/{xen-xsplice.c => xen-livepatch.c} (86%)
 create mode 100644 xen/arch/arm/livepatch.c
 delete mode 100644 xen/arch/arm/xsplice.c
 rename xen/arch/x86/{xsplice.c => livepatch.c} (74%)
 rename xen/common/{xsplice.c => livepatch.c} (75%)
 rename xen/common/{xsplice_elf.c => livepatch_elf.c} (72%)
 create mode 100644 xen/include/xen/livepatch.h
 rename xen/include/xen/{xsplice_elf.h => livepatch_elf.h} (56%)
 delete mode 100644 xen/include/xen/xsplice.h
.gitignore +4 -4
index 1b73293..bf8cb42 100644
@@ -182,7 +182,7 @@ tools/misc/xen_cpuperf
 tools/misc/xen-cpuid
 tools/misc/xen-detect
 tools/misc/xen-tmem-list-parse
-tools/misc/xen-xsplice
+tools/misc/xen-livepatch
 tools/misc/xenperf
 tools/misc/xenpm
 tools/misc/xen-hvmctx
@@ -247,9 +247,9 @@ xen/arch/x86/efi/check.efi
 xen/arch/x86/efi/disabled
 xen/arch/x86/efi/mkreloc
 xen/arch/x86/test/config.h
-xen/arch/x86/test/xen_hello_world.xsplice
-xen/arch/x86/test/xen_bye_world.xsplice
-xen/arch/x86/test/xen_replace_world.xsplice
+xen/arch/x86/test/xen_hello_world.xlivepatch
+xen/arch/x86/test/xen_bye_world.xlivepatch
+xen/arch/x86/test/xen_replace_world.xlivepatch
 xen/arch/*/efi/boot.c
 xen/arch/*/efi/compat.c
 xen/arch/*/efi/efi.h
MAINTAINERS +10 -10
index 62f4ffd..d5792ed 100644
@@ -274,6 +274,16 @@ L:	[email protected]
 T:	git git://xenbits.xen.org/mini-os.git
 F:	config/MiniOS.mk
 
+LIVE PATCH
+M:  Konrad Rzeszutek Wilk <[email protected]>
+M:  Ross Lagerwall <[email protected]>
+S:  Supported
+F:  docs/misc/livepatch.markdown
+F:  tools/misc/xen-livepatch.c
+F:  xen/arch/*/livepatch*
+F:  xen/common/livepatch*
+F:  xen/include/xen/livepatch*
+
 OCAML TOOLS
 M:	David Scott <[email protected]>
 S:	Supported
@@ -470,16 +480,6 @@ F:  xen/include/xsm/
 F:  xen/xsm/
 F:  docs/misc/xsm-flask.txt
 
-XSPLICE
-M:  Konrad Rzeszutek Wilk <[email protected]>
-M:  Ross Lagerwall <[email protected]>
-S:  Supported
-F:  docs/misc/xsplice.markdown
-F:  tools/misc/xen-xsplice.c
-F:  xen/arch/*/xsplice*
-F:  xen/common/xsplice*
-F:  xen/include/xen/xsplice*
-
 THE REST
 M:	Andrew Cooper <[email protected]>
 M:	George Dunlap <[email protected]>
docs/misc/livepatch.markdown renamed from docs/misc/xsplice.markdown +92 -92

435 lines not on this page · raw message

tools/flask/policy/policy/modules/xen/xen.te +1 -1
index 0b1c955..50aa602 100644
@@ -74,7 +74,7 @@ allow dom0_t xen_t:xen2 {
     get_symbol
     get_cpu_levelling_caps
     get_cpu_featureset
-    xsplice_op
+    livepatch_op
 };
 
 # Allow dom0 to use all XENVER_ subops that have checks.
tools/libxc/include/xenctrl.h +16 -16
index dc54612..5180b70 100644
@@ -2610,15 +2610,15 @@ const uint32_t *xc_get_feature_deep_deps(uint32_t feature);
 
 #endif
 
-int xc_xsplice_upload(xc_interface *xch,
-                      char *name, unsigned char *payload, uint32_t size);
+int xc_livepatch_upload(xc_interface *xch,
+                        char *name, unsigned char *payload, uint32_t size);
 
-int xc_xsplice_get(xc_interface *xch,
-                   char *name,
-                   xen_xsplice_status_t *status);
+int xc_livepatch_get(xc_interface *xch,
+                     char *name,
+                     xen_livepatch_status_t *status);
 
 /*
- * The heart of this function is to get an array of xen_xsplice_status_t.
+ * The heart of this function is to get an array of xen_livepatch_status_t.
  *
  * However it is complex because it has to deal with the hypervisor
  * returning some of the requested data or data being stale
@@ -2638,10 +2638,10 @@ int xc_xsplice_get(xc_interface *xch,
  * number of entries that 'info', 'name', and 'len' arrays can
  * be filled up with.
  *
- * Each entry in the 'name' array is expected to be of XEN_XSPLICE_NAME_SIZE
+ * Each entry in the 'name' array is expected to be of XEN_LIVE_PATCH_NAME_SIZE
  * length.
  *
- * Each entry in the 'info' array is expected to be of xen_xsplice_status_t
+ * Each entry in the 'info' array is expected to be of xen_livepatch_status_t
  * structure size.
  *
  * Each entry in the 'len' array is expected to be of uint32_t size.
@@ -2655,10 +2655,10 @@ int xc_xsplice_get(xc_interface *xch,
  * will contain the number of entries that had been succesfully
  * retrieved (if any).
  */
-int xc_xsplice_list(xc_interface *xch, unsigned int max, unsigned int start,
-                    xen_xsplice_status_t *info, char *name,
-                    uint32_t *len, unsigned int *done,
-                    unsigned int *left);
+int xc_livepatch_list(xc_interface *xch, unsigned int max, unsigned int start,
+                      xen_livepatch_status_t *info, char *name,
+                      uint32_t *len, unsigned int *done,
+                      unsigned int *left);
 
 /*
  * The operations are asynchronous and the hypervisor may take a while
@@ -2666,10 +2666,10 @@ int xc_xsplice_list(xc_interface *xch, unsigned int max, unsigned int start,
  * operation if it could not be completed within the specified time
  * (in ms). Value of 0 means let hypervisor decide the best timeout.
  */
-int xc_xsplice_apply(xc_interface *xch, char *name, uint32_t timeout);
-int xc_xsplice_revert(xc_interface *xch, char *name, uint32_t timeout);
-int xc_xsplice_unload(xc_interface *xch, char *name, uint32_t timeout);
-int xc_xsplice_replace(xc_interface *xch, char *name, uint32_t timeout);
+int xc_livepatch_apply(xc_interface *xch, char *name, uint32_t timeout);
+int xc_livepatch_revert(xc_interface *xch, char *name, uint32_t timeout);
+int xc_livepatch_unload(xc_interface *xch, char *name, uint32_t timeout);
+int xc_livepatch_replace(xc_interface *xch, char *name, uint32_t timeout);
 
 /* Compat shims */
 #include "xenctrl_compat.h"
tools/libxc/xc_misc.c +71 -71

297 lines not on this page · raw message

tools/misc/Makefile +2 -2
index 3a5f842..cee2b99 100644
@@ -32,7 +32,7 @@ INSTALL_SBIN                   += xenlockprof
 INSTALL_SBIN                   += xenperf
 INSTALL_SBIN                   += xenpm
 INSTALL_SBIN                   += xenwatchdogd
-INSTALL_SBIN                   += xen-xsplice
+INSTALL_SBIN                   += xen-livepatch
 INSTALL_SBIN += $(INSTALL_SBIN-y)
 
 # Everything to be installed in a private bin/
@@ -104,7 +104,7 @@ xen-mfndump: xen-mfndump.o
 xenwatchdogd: xenwatchdogd.o
 	$(CC) $(LDFLAGS) -o $@ $< $(LDLIBS_libxenctrl) $(APPEND_LDFLAGS)
 
-xen-xsplice: xen-xsplice.o
+xen-livepatch: xen-livepatch.o
 	$(CC) $(LDFLAGS) -o $@ $< $(LDLIBS_libxenctrl) $(APPEND_LDFLAGS)
 
 xen-lowmemd: xen-lowmemd.o
tools/misc/xen-livepatch.c renamed from tools/misc/xen-xsplice.c +31 -31

167 lines not on this page · raw message

xen/arch/arm/Makefile +1 -1
index ead0cc0..7af3140 100644
@@ -40,7 +40,7 @@ obj-y += device.o
 obj-y += decode.o
 obj-y += processor.o
 obj-y += smc.o
-obj-$(CONFIG_XSPLICE) += xsplice.o
+obj-$(CONFIG_LIVE_PATCH) += livepatch.o
 
 #obj-bin-y += ....o
 
xen/arch/arm/livepatch.c new file +79 -0

79 lines not on this page · raw message

xen/arch/arm/xsplice.c deleted +0 -79

79 lines not on this page · raw message

xen/arch/x86/Makefile +4 -4
index 4665a68..5023e79 100644
@@ -7,7 +7,7 @@ subdir-$(CONFIG_XENOPROF) += oprofile
 subdir-y += x86_64
 
 alternative-y := alternative.init.o
-alternative-$(CONFIG_XSPLICE) :=
+alternative-$(CONFIG_LIVE_PATCH) :=
 obj-bin-y += $(alternative-y)
 obj-y += apic.o
 obj-y += bitops.o
@@ -30,6 +30,7 @@ obj-y += flushtlb.o
 obj-y += i387.o
 obj-y += i8259.o
 obj-y += io_apic.o
+obj-$(CONFIG_LIVE_PATCH) += alternative.o livepatch.o
 obj-y += msi.o
 obj-y += ioport_emulate.o
 obj-y += irq.o
@@ -63,7 +64,6 @@ obj-y += x86_emulate.o
 obj-y += tboot.o
 obj-y += hpet.o
 obj-y += vm_event.o
-obj-$(CONFIG_XSPLICE) += alternative.o xsplice.o
 obj-y += xstate.o
 
 obj-$(crash_debug) += gdbstub.o
@@ -80,7 +80,7 @@ else
 notes_phdrs =
 endif
 
-ifdef CONFIG_XSPLICE
+ifdef CONFIG_LIVE_PATCH
 all_symbols = --all-symbols
 ifdef CONFIG_FAST_SYMBOL_LOOKUP
 all_symbols = --all-symbols --sort-by-name
@@ -95,7 +95,7 @@ $(TARGET): $(TARGET)-syms $(efi-y) boot/mkelf32
 
 .PHONY: tests
 tests:
-	$(MAKE) -f $(BASEDIR)/Rules.mk -C test xsplice
+	$(MAKE) -f $(BASEDIR)/Rules.mk -C test livepatch
 
 ALL_OBJS := $(BASEDIR)/arch/x86/boot/built_in.o $(BASEDIR)/arch/x86/efi/built_in.o $(ALL_OBJS)
 
xen/arch/x86/alternative.c +9 -9
index c188a15..be40b13 100644
@@ -22,14 +22,14 @@
 #include <asm/system.h>
 #include <asm/traps.h>
 #include <asm/nmi.h>
-#include <xen/xsplice.h>
+#include <xen/livepatch.h>
 
 #define MAX_PATCH_LEN (255-1)
 
 extern struct alt_instr __alt_instructions[], __alt_instructions_end[];
 
 #ifdef K8_NOP1
-static const unsigned char k8nops[] init_or_xsplice_const = {
+static const unsigned char k8nops[] init_or_livepatch_const = {
     K8_NOP1,
     K8_NOP2,
     K8_NOP3,
@@ -39,7 +39,7 @@ static const unsigned char k8nops[] init_or_xsplice_const = {
     K8_NOP7,
     K8_NOP8
 };
-static const unsigned char * const k8_nops[ASM_NOP_MAX+1] init_or_xsplice_constrel = {
+static const unsigned char * const k8_nops[ASM_NOP_MAX+1] init_or_livepatch_constrel = {
     NULL,
     k8nops,
     k8nops + 1,
@@ -53,7 +53,7 @@ static const unsigned char * const k8_nops[ASM_NOP_MAX+1] init_or_xsplice_constr
 #endif
 
 #ifdef P6_NOP1
-static const unsigned char p6nops[] init_or_xsplice_const = {
+static const unsigned char p6nops[] init_or_livepatch_const = {
     P6_NOP1,
     P6_NOP2,
     P6_NOP3,
@@ -63,7 +63,7 @@ static const unsigned char p6nops[] init_or_xsplice_const = {
     P6_NOP7,
     P6_NOP8
 };
-static const unsigned char * const p6_nops[ASM_NOP_MAX+1] init_or_xsplice_constrel = {
+static const unsigned char * const p6_nops[ASM_NOP_MAX+1] init_or_livepatch_constrel = {
     NULL,
     p6nops,
     p6nops + 1,
@@ -76,7 +76,7 @@ static const unsigned char * const p6_nops[ASM_NOP_MAX+1] init_or_xsplice_constr
 };
 #endif
 
-static const unsigned char * const *ideal_nops init_or_xsplice_data = k8_nops;
+static const unsigned char * const *ideal_nops init_or_livepatch_data = k8_nops;
 
 static int __init mask_nmi_callback(const struct cpu_user_regs *regs, int cpu)
 {
@@ -101,7 +101,7 @@ static void __init arch_init_ideal_nops(void)
 }
 
 /* Use this to add nops to a buffer, then text_poke the whole buffer. */
-static void init_or_xsplice add_nops(void *insns, unsigned int len)
+static void init_or_livepatch add_nops(void *insns, unsigned int len)
 {
     while ( len > 0 )
     {
@@ -129,7 +129,7 @@ static void init_or_xsplice add_nops(void *insns, unsigned int len)
  * You should run this with interrupts disabled or on code that is not
  * executing.
  */
-static void *init_or_xsplice text_poke(void *addr, const void *opcode, size_t len)
+static void *init_or_livepatch text_poke(void *addr, const void *opcode, size_t len)
 {
     memcpy(addr, opcode, len);
     sync_core();
@@ -144,7 +144,7 @@ static void *init_or_xsplice text_poke(void *addr, const void *opcode, size_t le
  * APs have less capabilities than the boot processor are not handled.
  * Tough. Make sure you disable such features by hand.
  */
-void init_or_xsplice apply_alternatives_nocheck(struct alt_instr *start, struct alt_instr *end)
+void init_or_livepatch apply_alternatives_nocheck(struct alt_instr *start, struct alt_instr *end)
 {
     struct alt_instr *a;
     u8 *instr, *replacement;
xen/arch/x86/domain.c +2 -2
index 5af2cc5..f2d7f47 100644
@@ -36,7 +36,7 @@
 #include <xen/cpu.h>
 #include <xen/wait.h>
 #include <xen/guest_access.h>
-#include <xen/xsplice.h>
+#include <xen/livepatch.h>
 #include <public/sysctl.h>
 #include <public/hvm/hvm_vcpu.h>
 #include <asm/regs.h>
@@ -125,7 +125,7 @@ static void idle_loop(void)
          * We MUST be last (or before pm_idle). Otherwise after we get the
          * softirq we would execute pm_idle (and sleep) and not patch.
          */
-        check_for_xsplice_work();
+        check_for_livepatch_work();
     }
 }
 
xen/arch/x86/extable.c +4 -4
index 349df79..701441a 100644
@@ -7,7 +7,7 @@
 #include <xen/spinlock.h>
 #include <asm/uaccess.h>
 #include <xen/virtual_region.h>
-#include <xen/xsplice.h>
+#include <xen/livepatch.h>
 
 #define EX_FIELD(ptr, field) ((unsigned long)&(ptr)->field + (ptr)->field)
 
@@ -21,7 +21,7 @@ static inline unsigned long ex_cont(const struct exception_table_entry *x)
 	return EX_FIELD(x, cont);
 }
 
-static int init_or_xsplice cmp_ex(const void *a, const void *b)
+static int init_or_livepatch cmp_ex(const void *a, const void *b)
 {
 	const struct exception_table_entry *l = a, *r = b;
 	unsigned long lip = ex_addr(l);
@@ -36,7 +36,7 @@ static int init_or_xsplice cmp_ex(const void *a, const void *b)
 }
 
 #ifndef swap_ex
-static void init_or_xsplice swap_ex(void *a, void *b, int size)
+static void init_or_livepatch swap_ex(void *a, void *b, int size)
 {
 	struct exception_table_entry *l = a, *r = b, tmp;
 	long delta = b - a;
@@ -49,7 +49,7 @@ static void init_or_xsplice swap_ex(void *a, void *b, int size)
 }
 #endif
 
-void init_or_xsplice sort_exception_table(struct exception_table_entry *start,
+void init_or_livepatch sort_exception_table(struct exception_table_entry *start,
                                  const struct exception_table_entry *stop)
 {
     sort(start, stop - start,
xen/arch/x86/livepatch.c renamed from xen/arch/x86/xsplice.c +28 -28

177 lines not on this page · raw message

xen/arch/x86/test/Makefile +29 -29

96 lines not on this page · raw message

xen/arch/x86/test/xen_bye_world.c +3 -3
index f93f969..fa4b005 100644
@@ -5,17 +5,17 @@
 
 #include "config.h"
 #include <xen/lib.h>
+#include <xen/livepatch.h>
 #include <xen/types.h>
 #include <xen/version.h>
-#include <xen/xsplice.h>
 
 #include <public/sysctl.h>
 
 static char bye_world_patch_this_fnc[] = "xen_extra_version";
 extern const char *xen_bye_world(void);
 
-struct xsplice_patch_func __section(".xsplice.funcs") xsplice_xen_bye_world = {
-    .version = XSPLICE_PAYLOAD_VERSION,
+struct livepatch_func __section(".livepatch.funcs") livepatch_xen_bye_world = {
+    .version = LIVE_PATCH_PAYLOAD_VERSION,
     .name = bye_world_patch_this_fnc,
     .new_addr = xen_bye_world,
     .old_addr = xen_extra_version,
xen/arch/x86/test/xen_hello_world.c +3 -3
index 8afd66e..057e962 100644
@@ -6,15 +6,15 @@
 #include "config.h"
 #include <xen/types.h>
 #include <xen/version.h>
-#include <xen/xsplice.h>
+#include <xen/livepatch.h>
 
 #include <public/sysctl.h>
 
 static char hello_world_patch_this_fnc[] = "xen_extra_version";
 extern const char *xen_hello_world(void);
 
-struct xsplice_patch_func __section(".xsplice.funcs") xsplice_xen_hello_world = {
-    .version = XSPLICE_PAYLOAD_VERSION,
+struct livepatch_func __section(".livepatch.funcs") livepatch_xen_hello_world = {
+    .version = LIVE_PATCH_PAYLOAD_VERSION,
     .name = hello_world_patch_this_fnc,
     .new_addr = xen_hello_world,
     .old_addr = xen_extra_version,
xen/arch/x86/test/xen_replace_world.c +3 -3
index fab2841..2b98829 100644
@@ -5,16 +5,16 @@
 
 #include "config.h"
 #include <xen/lib.h>
+#include <xen/livepatch.h>
 #include <xen/types.h>
-#include <xen/xsplice.h>
 
 #include <public/sysctl.h>
 
 static char xen_replace_world_name[] = "xen_extra_version";
 extern const char *xen_replace_world(void);
 
-struct xsplice_patch_func __section(".xsplice.funcs") xsplice_xen_replace_world = {
-    .version = XSPLICE_PAYLOAD_VERSION,
+struct livepatch_func __section(".livepatch.funcs") livepatch_xen_replace_world = {
+    .version = LIVE_PATCH_PAYLOAD_VERSION,
     .name = xen_replace_world_name,
     .old_addr = 0, /* Forces the hypervisor to lookup .name */
     .new_addr = xen_replace_world,
xen/arch/x86/traps.c +1 -1
index 1ef8401..7160340 100644
@@ -50,7 +50,7 @@
 #include <xen/paging.h>
 #include <xen/virtual_region.h>
 #include <xen/watchdog.h>
-#include <xen/xsplice.h>
+#include <xen/livepatch.h>
 #include <asm/system.h>
 #include <asm/io.h>
 #include <asm/atomic.h>
xen/common/Kconfig +5 -5
index 91ea904..f430f05 100644
@@ -192,9 +192,9 @@ config SCHED_DEFAULT
 
 endmenu
 
-# Enable/Disable xsplice support
-config XSPLICE
-	bool "xSplice live patching support (TECH PREVIEW)"
+# Enable/Disable live patching support
+config LIVE_PATCH
+	bool "Live patching support (TECH PREVIEW)"
 	default n
 	depends on X86 && HAS_BUILD_ID = "y"
 	---help---
@@ -207,13 +207,13 @@ config XSPLICE
 config FAST_SYMBOL_LOOKUP
 	bool "Fast symbol lookup (bigger binary)"
 	default y
-	depends on XSPLICE
+	depends on LIVE_PATCH
 	---help---
 	  When searching for symbol addresses we can use the built-in system
 	  that is optimized for searching symbols using addresses as the key.
 	  However using it for the inverse (find address using the symbol name)
 	  it is slow. This extra data and code (~55kB) speeds up the search.
-	  The only user of this is xSplice.
+	  The only user of this is live patching.
 
 	  If unsure, say Y.
 endmenu
xen/common/Makefile +2 -2
index afd84b6..75760a4 100644
@@ -17,6 +17,8 @@ obj-y += keyhandler.o
 obj-$(CONFIG_KEXEC) += kexec.o
 obj-$(CONFIG_KEXEC) += kimage.o
 obj-y += lib.o
+obj-$(CONFIG_LIVE_PATCH) += livepatch.o
+obj-$(CONFIG_LIVE_PATCH) += livepatch_elf.o
 obj-y += lzo.o
 obj-$(CONFIG_HAS_MEM_ACCESS) += mem_access.o
 obj-y += memory.o
@@ -58,8 +60,6 @@ obj-y += vsprintf.o
 obj-y += wait.o
 obj-$(CONFIG_XENOPROF) += xenoprof.o
 obj-y += xmalloc_tlsf.o
-obj-$(CONFIG_XSPLICE) += xsplice.o
-obj-$(CONFIG_XSPLICE) += xsplice_elf.o
 
 obj-bin-$(CONFIG_X86) += $(foreach n,decompress bunzip2 unxz unlzma unlzo unlz4 earlycpio,$(n).init.o)
 
xen/common/livepatch.c renamed from xen/common/xsplice.c +185 -185

1,029 lines not on this page · raw message

xen/common/livepatch_elf.c renamed from xen/common/xsplice_elf.c +55 -54

230 lines not on this page · raw message

xen/common/sysctl.c +3 -3
index 9a4cc1f..585dc20 100644

Lines of this file are not shown. View the raw message.

xen/common/virtual_region.c +2 -2
index 426dfa0..b666bc9 100644

Lines of this file are not shown. View the raw message.

xen/common/vsprintf.c +2 -2
index 70e1edf..82914d8 100644

Lines of this file are not shown. View the raw message.

xen/include/asm-x86/current.h +4 -4
index fa55602..7c6d623 100644

Lines of this file are not shown. View the raw message.

xen/include/public/sysctl.h +69 -69

138 lines not on this page · raw message

xen/include/xen/elfstructs.h +1 -1
index 68954b0..ceac45e 100644

Lines of this file are not shown. View the raw message.

xen/include/xen/livepatch.h new file +119 -0

119 lines not on this page · raw message

xen/include/xen/livepatch_elf.h renamed from xen/include/xen/xsplice_elf.h +18 -17
similarity index 56%
rename from xen/include/xen/xsplice_elf.h
rename to xen/include/xen/livepatch_elf.h
index 750dc94..e0baf5c 100644

Lines of this file are not shown. View the raw message.

xen/include/xen/xsplice.h deleted +0 -119

119 lines not on this page · raw message

xen/xsm/flask/hooks.c +2 -2
index 7477dbe..20d46c8 100644

Lines of this file are not shown. View the raw message.

xen/xsm/flask/policy/access_vectors +2 -2
index 4d1b548..3d29042 100644

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Signature · 7 lines
2.5.5


_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

Part of the diff is not shown here. View the raw message.

#1 lore raw

.gitignore tools/misc/xen_cpuperf · line 188

Quoted 9 lines · Konrad Rzeszutek Wilk
.gitignore +1 -1
@@ -182,7 +182,7 @@ tools/misc/xen_cpuperf
 tools/misc/xen-cpuid
 tools/misc/xen-detect
 tools/misc/xen-tmem-list-parse
-tools/misc/xen-xsplice
+tools/misc/xen-livepatch
 tools/misc/xenperf
 tools/misc/xenpm
 tools/misc/xen-hvmctx

Hate to be a pedant, but this could do with being sorted.

.gitignore xen/arch/x86/efi/check.efi · line 255

Quoted 13 lines
.gitignore +3 -3
@@ -247,9 +247,9 @@ xen/arch/x86/efi/check.efi
 xen/arch/x86/efi/disabled
 xen/arch/x86/efi/mkreloc
 xen/arch/x86/test/config.h
-xen/arch/x86/test/xen_hello_world.xsplice
-xen/arch/x86/test/xen_bye_world.xsplice
-xen/arch/x86/test/xen_replace_world.xsplice
+xen/arch/x86/test/xen_hello_world.xlivepatch
+xen/arch/x86/test/xen_bye_world.xlivepatch
+xen/arch/x86/test/xen_replace_world.xlivepatch
 xen/arch/*/efi/boot.c
 xen/arch/*/efi/compat.c
 xen/arch/*/efi/efi.h

And to throw a spanner in the works, a file extension of .xpatch would be a more natural fit here. (Then again, the contents of the file is all .livepatch.$FOO, so perhaps consistency is the more important attribute.)

MAINTAINERS L: [email protected] · line 277

Quoted 9 lines
MAINTAINERS +1 -0
index 62f4ffd..d5792ed 100644
@@ -274,6 +274,16 @@ L:	[email protected]
 T:	git git://xenbits.xen.org/mini-os.git
 F:	config/MiniOS.mk
 
+LIVE PATCH

PATCHING ?

MAINTAINERS one uint32_t to determine the sub-operations and one padding field which · line 428

Quoted 8 lines
MAINTAINERS +2 -2
@@ -424,8 +424,8 @@ one uint32_t to determine the sub-operations and one padding field which
 *MUST* always be zero.
 
 <pre>
-struct xen_sysctl_xsplice_op {  
-    uint32_t cmd;                   /* IN: XEN_SYSCTL_XSPLICE_*. */  
+struct xen_sysctl_livepatch_op {  
+    uint32_t cmd;                   /* IN: XEN_SYSCTL_LIVE_PATCH_*. */  

There is an inconsistency here between having a space or not. I would expect it to be XEN_SYSCTL_LIVEPATCH_*, to be consistent with other similar names.

I think livepatch is preferable to live_patch in this case. Same for similar constructs.

MAINTAINERS one uint32_t to determine the sub-operations and one padding field which · line 430

Quoted 4 lines
MAINTAINERS +2 -2
-    sysctl.cmd = XEN_SYSCTL_xsplice_op;
-    sysctl.u.xsplice.cmd = XEN_SYSCTL_XSPLICE_ACTION;
+    sysctl.cmd = XEN_SYSCTL_livepatch_op;
+    sysctl.u.livepatch.cmd = XEN_SYSCTL_LIVE_PATCH_ACTION;

Particularly emphasised here.

~Andrew

(P.S. It seems that even renaming things is hard.)

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#2 lore raw
Quoted 13 lines · Andrew Cooper

.gitignore tools/misc/xen_cpuperf · line 188

Quoted 9 lines · Konrad Rzeszutek Wilk
.gitignore +1 -1
@@ -182,7 +182,7 @@ tools/misc/xen_cpuperf
 tools/misc/xen-cpuid
 tools/misc/xen-detect
 tools/misc/xen-tmem-list-parse
-tools/misc/xen-xsplice
+tools/misc/xen-livepatch
 tools/misc/xenperf
 tools/misc/xenpm
 tools/misc/xen-hvmctx

Hate to be a pedant, but this could do with being sorted.

But please don't do that in this series.

We can "sort" this out later.

Quoted 10 lines
Quoted 10 lines
.gitignore +3 -3
@@ -247,9 +247,9 @@ xen/arch/x86/efi/check.efi
 xen/arch/x86/efi/disabled
 xen/arch/x86/efi/mkreloc
 xen/arch/x86/test/config.h
-xen/arch/x86/test/xen_hello_world.xsplice
-xen/arch/x86/test/xen_bye_world.xsplice
-xen/arch/x86/test/xen_replace_world.xsplice
+xen/arch/x86/test/xen_hello_world.xlivepatch
+xen/arch/x86/test/xen_bye_world.xlivepatch
+xen/arch/x86/test/xen_replace_world.xlivepatch
Quoted 9 lines

.gitignore xen/arch/x86/efi/check.efi · line 255

Quoted 3 lines
.gitignore +0 -0
 xen/arch/*/efi/boot.c
 xen/arch/*/efi/compat.c
 xen/arch/*/efi/efi.h

And to throw a spanner in the works, a file extension of .xpatch would be a more natural fit here. (Then again, the contents of the file is all .livepatch.$FOO, so perhaps consistency is the more important attribute.)

+1 for consistency.

Wei.

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#3 lore raw
In reply to Konrad Rzeszutek Wilk
Quoted 6 lines
Quoted 1 line
Quoted 1 line · On 02.06.16 at 02:14, <[email protected]> wrote:

Specifically:

s/\.xsplice/\.xlivepatch/
s/XSPLICE_OP/LIVEPATCH_OP/
s/XSPLICE/LIVE_PATCH/

I agree with Andrew that for consistency there should never be an underscore between "live" and "patch", no matter what case both parts are in. Apart from consistency this also reduces symbol name length growth.

Quoted 3 lines

s/xsplice/livepatch/
s/livepatch_patch_func/livepatch_func/
s/xSplice/Xen Live Patching/

As already mentioned in the earlier discussion, the patters above do not match up with e.g. arch_livepatching_enter() - I think the "ing" would better be dropped.

Quoted 10 lines
 rename docs/misc/{xsplice.markdown => livepatch.markdown} (87%)
 rename tools/misc/{xen-xsplice.c => xen-livepatch.c} (86%)
 create mode 100644 xen/arch/arm/livepatch.c
 delete mode 100644 xen/arch/arm/xsplice.c
 rename xen/arch/x86/{xsplice.c => livepatch.c} (74%)
 rename xen/common/{xsplice.c => livepatch.c} (75%)
 rename xen/common/{xsplice_elf.c => livepatch_elf.c} (72%)
 create mode 100644 xen/include/xen/livepatch.h
 rename xen/include/xen/{xsplice_elf.h => livepatch_elf.h} (56%)
 delete mode 100644 xen/include/xen/xsplice.h

Could you fiddle with the thresholds so that all renames actually get reflected as such? Perhaps, as I think you had suggested elsewhere, separating file name changes from symbols names ones would eliminate that issue altogether.

Jan

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#4 lore raw

Jan Beulich writes ("Re: [PATCH for 4.7] xen: Rename of xSplice to livepatch."):

Quoted 3 lines

Perhaps, as I think you had suggested
elsewhere, separating file name changes from symbols names ones would eliminate that issue altogether.

I endorse this product and/or service.

Ian.

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel