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

Re: [Xen-devel] [PATCH v2 00/12] livepatch: new features and fixes



> Pawel Wieczorkiewicz (12):
>   [1] livepatch: Always check hypervisor build ID upon hotpatch upload
>   [2] livepatch: Allow to override inter-modules buildid dependency
>   [3] livepatch: Export payload structure via livepatch_payload.h
>   [4] livepatch: Implement pre-|post- apply|revert hooks
>   [5] livepatch: Add support for apply|revert action replacement hooks
>   [6] livepatch: Do not enforce ELF_LIVEPATCH_FUNC section presence
>   [7] livepatch: Add per-function applied/reverted state tracking marker

I've added the test-cases to the little tool I use (including the diff)
http://xenbits.xen.org/gitweb/?p=xentesttools/bootstrap.git;a=blob;f=root_image/debugspace/livepatch_test.pl;h=37fb668a53ca1e7a084bfc4417f90e8ae078f7e5;hb=HEAD


>   [8] livepatch: Add support for inline asm hotpatching expectations

..but didn't expand on #8 as it still needs a bit of help on ARM..

Irrespective of that:

a)  Need to update the docs to alter the text where it says that the
entries are 8 bytes long - as on ARM32 they are 4 bytes.

b) Update the docs to say it is spec 2, not 1.

c) Also need OK or Acked-by from Julie on ARM.

I can do a) and b) when v3 is posted or when the fixes for to patch #8 are
all good and can squash them in. (And will also update the test-case to
include the code change for the asm livepatch).

diff --git a/root_image/debugspace/livepatch_test.pl 
b/root_image/debugspace/livepatch_test.pl
index 37fb668..a96c9fc 100755
--- a/root_image/debugspace/livepatch_test.pl
+++ b/root_image/debugspace/livepatch_test.pl
@@ -9,7 +9,14 @@ use File::Temp qw(tempfile);
 my @livepatch_files = qw(xen_hello_world.livepatch
                         xen_replace_world.livepatch
                          xen_bye_world.livepatch
-                        xen_nop.livepatch);
+                        xen_nop.livepatch
+                        xen_no_xen_buildid.livepatch
+                        xen_prepost_hooks_fail.livepatch
+                        xen_prepost_hooks.livepatch
+                        xen_action_hooks.livepatch
+                        xen_action_hooks_marker.livepatch
+                        xen_action_hooks_noapply.livepatch
+                        xen_action_hooks_norevert.livepatch);
 
 my $livepatch_dir="/usr/lib/debug/livepatch";
 my $xen_extra_info;
@@ -111,6 +118,25 @@ my @livepatch_tests = (
     { C => "xen-livepatch unload xen_nop", rc => 256 },
     { C => "xen-livepatch revert xen_nop" },
     { C => "xen-livepatch unload xen_nop" },
+    { C => "xen-livepatch load xen_no_xen_buildid.livepatch", rc => 256 },
+    { C => "xen-livepatch load xen_prepost_hooks_fail.livepatch", rc => 256 },
+    { C => "xen-livepatch load xen_prepost_hooks.livepatch" },
+    # First revert fails
+    { C => "xen-livepatch revert xen_prepost_hooks", rc => 256 },
+    { C => "xen-livepatch revert xen_prepost_hooks" },
+    { C => "xen-livepatch unload xen_prepost_hooks" },
+    { C => "xen-livepatch load xen_action_hooks.livepatch" },
+    { C => "xen-livepatch revert xen_action_hooks" },
+    { C => "xen-livepatch unload xen_action_hooks" },
+    { C => "xen-livepatch load xen_action_hooks_marker.livepatch" },
+    { C => "xen-livepatch revert xen_action_hooks_marker" },
+    { C => "xen-livepatch unload xen_action_hooks_marker" },
+    { C => "xen-livepatch load xen_action_hooks_noapply.livepatch" },
+    { C => "xen-livepatch revert xen_action_hooks_noapply" },
+    { C => "xen-livepatch unload xen_action_hooks_noapply" },
+    { C => "xen-livepatch load xen_action_hooks_norevert.livepatch" },
+    { C => "xen-livepatch revert xen_action_hooks_norevert" },
+    { C => "xen-livepatch unload xen_action_hooks_norevert" },
     );
 
 # Copied from 
https://stackoverflow.com/questions/11514947/capture-the-output-of-perl-system

_______________________________________________
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®.