* [RFC PATCH] plugins/core: add missing QEMU_DISABLE_CFI annotations
@ 2025-10-23 13:39 Alex Bennée
2025-10-27 7:03 ` Pierrick Bouvier
0 siblings, 1 reply; 2+ messages in thread
From: Alex Bennée @ 2025-10-23 13:39 UTC (permalink / raw)
To: qemu-devel
Cc: Alex Bennée, Peter Maydell, Alexandre Iooss, Mahmoud Mandour,
Pierrick Bouvier
Most of the memory callbacks come directly from the generated code
however we have do have a a direct from C callback for the slow-path
and memory helpers.
There is also a reset callback that calls out to plugins.
Like the other plugin points we need to disable CFI as we are making
function calls to dynamically linked libraries.
Fixes: https://gitlab.com/qemu-project/qemu/-/issues/3175
Reported-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
plugins/core.c | 1 +
plugins/loader.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/plugins/core.c b/plugins/core.c
index 35a252d2729..8f8bc7219c2 100644
--- a/plugins/core.c
+++ b/plugins/core.c
@@ -668,6 +668,7 @@ void exec_inline_op(enum plugin_dyn_cb_type type,
}
}
+QEMU_DISABLE_CFI
void qemu_plugin_vcpu_mem_cb(CPUState *cpu, uint64_t vaddr,
uint64_t value_low,
uint64_t value_high,
diff --git a/plugins/loader.c b/plugins/loader.c
index ba10ebac993..0dbe7bea263 100644
--- a/plugins/loader.c
+++ b/plugins/loader.c
@@ -318,6 +318,7 @@ struct qemu_plugin_reset_data {
bool reset;
};
+QEMU_DISABLE_CFI
static void plugin_reset_destroy__locked(struct qemu_plugin_reset_data *data)
{
struct qemu_plugin_ctx *ctx = data->ctx;
--
2.47.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [RFC PATCH] plugins/core: add missing QEMU_DISABLE_CFI annotations
2025-10-23 13:39 [RFC PATCH] plugins/core: add missing QEMU_DISABLE_CFI annotations Alex Bennée
@ 2025-10-27 7:03 ` Pierrick Bouvier
0 siblings, 0 replies; 2+ messages in thread
From: Pierrick Bouvier @ 2025-10-27 7:03 UTC (permalink / raw)
To: Alex Bennée, qemu-devel
Cc: Peter Maydell, Alexandre Iooss, Mahmoud Mandour
On 2025-10-23 15:39, Alex Bennée wrote:
> Most of the memory callbacks come directly from the generated code
> however we have do have a a direct from C callback for the slow-path
> and memory helpers.
>
> There is also a reset callback that calls out to plugins.
>
> Like the other plugin points we need to disable CFI as we are making
> function calls to dynamically linked libraries.
>
> Fixes: https://gitlab.com/qemu-project/qemu/-/issues/3175
> Reported-by: Peter Maydell <peter.maydell@linaro.org>
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> ---
> plugins/core.c | 1 +
> plugins/loader.c | 1 +
> 2 files changed, 2 insertions(+)
Thanks for the fix.
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-10-27 7:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-23 13:39 [RFC PATCH] plugins/core: add missing QEMU_DISABLE_CFI annotations Alex Bennée
2025-10-27 7:03 ` Pierrick Bouvier
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).