All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v5 1/2] Livepatch: resolve old address before function verification
@ 2022-03-09 14:52 Bjoern Doebel
  2022-03-09 14:53 ` [PATCH v5 2/2] xen/x86: Livepatch: support patching CET-enhanced functions Bjoern Doebel
  0 siblings, 1 reply; 8+ messages in thread
From: Bjoern Doebel @ 2022-03-09 14:52 UTC (permalink / raw)
  To: xen-devel
  Cc: Michael Kurth, Martin Pohlack, Roger Pau Monne, Andrew Cooper,
	Bjoern Doebel, Konrad Rzeszutek Wilk, Ross Lagerwall

When verifying that a livepatch can be applied, we may as well want to
inspect the target function to be patched. To do so, we need to resolve
this function's address before running the arch-specific
livepatch_verify hook.

Signed-off-by: Bjoern Doebel <doebel@amazon.de>
Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Reviewed-by: Ross Lagerwall <ross.lagerwall@citrix.com>
---
 xen/common/livepatch.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/xen/common/livepatch.c b/xen/common/livepatch.c
index ec301a9f12..be2cf75c2d 100644
--- a/xen/common/livepatch.c
+++ b/xen/common/livepatch.c
@@ -684,11 +684,11 @@ static int prepare_payload(struct payload *payload,
                 return -EINVAL;
             }
 
-            rc = arch_livepatch_verify_func(f);
+            rc = resolve_old_address(f, elf);
             if ( rc )
                 return rc;
 
-            rc = resolve_old_address(f, elf);
+            rc = arch_livepatch_verify_func(f);
             if ( rc )
                 return rc;
 
-- 
2.32.0




Amazon Development Center Germany GmbH
Krausenstr. 38
10117 Berlin
Geschaeftsfuehrung: Christian Schlaeger, Jonathan Weiss
Eingetragen am Amtsgericht Charlottenburg unter HRB 149173 B
Sitz: Berlin
Ust-ID: DE 289 237 879





^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-03-17 13:11 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-09 14:52 [PATCH v5 1/2] Livepatch: resolve old address before function verification Bjoern Doebel
2022-03-09 14:53 ` [PATCH v5 2/2] xen/x86: Livepatch: support patching CET-enhanced functions Bjoern Doebel
2022-03-09 15:14   ` Jan Beulich
2022-03-09 17:12   ` Ross Lagerwall
2022-03-17  9:17     ` Jiamei Xie
2022-03-17 10:00       ` Jiamei Xie
2022-03-17 10:11         ` Jan Beulich
2022-03-17 13:10         ` Doebel, Bjoern

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.