On 9/17/19 10:12 AM, Wieczorkiewicz, Pawel wrote:
diff --git a/xen/include/xen/livepatch_payload.h
b/xen/include/xen/livepatch_payload.h
index 99613af2db..cd20944cc4 100644
--- a/xen/include/xen/livepatch_payload.h
+++ b/xen/include/xen/livepatch_payload.h
@@ -21,6 +21,16 @@ typedef struct payload livepatch_payload_t;
typedef void livepatch_loadcall_t(void);
typedef void livepatch_unloadcall_t(void);
+typedef int livepatch_precall_t(livepatch_payload_t *arg);
+typedef void livepatch_postcall_t(livepatch_payload_t *arg);
+
+struct livepatch_hooks {
+ struct {
+ livepatch_precall_t *const *pre;
+ livepatch_postcall_t *const *post;
Wouldn't it be simpler to drop a level of indirection here?
I think it would complicate things, because the handling of original hooks
(load, unload)
has been implemented as a pointer to an array of pointers (because of the
multiple hooks requirement).
I did not want to introduce a distinction between pointers to multiple hooks
and single hooks for simplicity
(all the hooks are arrays of pointers, even if there is only a single hook).
I believe that makes the whole code a bit more consistent and potentially
re-usable.
OK, fair enough.
--
Ross Lagerwall
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel