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

[Xen-devel] [livepatch-hooks-2 PATCH 1/4] create-diff-object: Handle optional apply|revert hooks



Include new sections containing optional apply and revert action
hooks.

The following new section names are supported:
  - .livepatch.hooks.apply
  - .livepatch.hooks.revert

Signed-off-by: Pawel Wieczorkiewicz <wipawel@xxxxxxxxx>
---
 create-diff-object.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/create-diff-object.c b/create-diff-object.c
index 3493fe1..263c7d2 100644
--- a/create-diff-object.c
+++ b/create-diff-object.c
@@ -1118,6 +1118,14 @@ static struct special_section special_sections[] = {
                .name           = ".livepatch.hooks.postrevert",
                .group_size     = livepatch_hooks_group_size,
        },
+       {
+               .name           = ".livepatch.hooks.apply",
+               .group_size     = livepatch_hooks_group_size,
+       },
+       {
+               .name           = ".livepatch.hooks.revert",
+               .group_size     = livepatch_hooks_group_size,
+       },
        {},
 };
 
@@ -1483,6 +1491,7 @@ static void kpatch_include_debug_sections(struct 
kpatch_elf *kelf)
 
 #define IS_ACTION_HOOK_SECTION(section, action) ({ \
         IS_HOOK_SECTION(section, "pre" action) || \
+        IS_HOOK_SECTION(section, action) || \
         IS_HOOK_SECTION(section, "post" action); \
 })
 
@@ -1492,6 +1501,7 @@ static void kpatch_include_debug_sections(struct 
kpatch_elf *kelf)
 
 #define IS_ACTION_HOOK_SYM_NAME(symbol, action) ({ \
         IS_HOOK_SYM_NAME(symbol, "pre" action) || \
+        IS_HOOK_SYM_NAME(symbol, action) || \
         IS_HOOK_SYM_NAME(symbol, "post" action); \
 })
 
-- 
2.16.5




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
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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