[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Xen-devel] [PATCH v3 04/12] livepatch: Implement pre-|post- apply|revert hooks
- To: "Wieczorkiewicz, Pawel" <wipawel@xxxxxxxxx>
- From: Ross Lagerwall <ross.lagerwall@xxxxxxxxxx>
- Date: Tue, 17 Sep 2019 10:15:52 +0100
- Authentication-results: esa2.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=ross.lagerwall@xxxxxxxxxx; spf=Pass smtp.mailfrom=ross.lagerwall@xxxxxxxxxx; spf=None smtp.helo=postmaster@xxxxxxxxxxxxxxx
- Cc: Tim Deegan <tim@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>, George Dunlap <George.Dunlap@xxxxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Ian Jackson <ian.jackson@xxxxxxxxxxxxx>, xen-devel <xen-devel@xxxxxxxxxxxxx>, "Pohlack, Martin" <mpohlack@xxxxxxxxx>, Julien Grall <julien.grall@xxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- Delivery-date: Tue, 17 Sep 2019 09:16:01 +0000
- Ironport-sdr: I+ta0LXVLGK/1vQ++lZOsvYeQD9GxOkvB48H5/cmZ9dArtjtHVdoMPBRfsI9jj+A14R9rppQQM Z1ha1xQvw8Sb8IDE0b5DjJ5GEKC7bCeAih0sgVcgRNsq6gleaoFRAPXyAVHQY4bgnbs6qs8qfZ ipwlA+vGFjiUbTs6ggbstz+Vk0bCDKS8VACp838J/sPr6BBjQe9CFEEUoftHUlZL0LC/xaO2bQ qPdk8LtQ+imJpNQTKO6KwU3GdIpq9mCiTflb9Jkgcet9+OtanaPowLfWoULGr1Hl/taI7+QDXA OWw=
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
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@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel
|