From: Bjoern Doebel Date: Wed, 9 Mar 2022 15:22:03 +0000 (+0100) Subject: livepatch: resolve old address before function verification X-Git-Tag: archive/raspbian/4.17.0-1+rpi1^2~33^2~843 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=5142dc5c25e317c208e3dc16d16b664b9f05dab5;p=xen.git livepatch: resolve old address before function verification 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 Acked-by: Konrad Rzeszutek Wilk Reviewed-by: Ross Lagerwall --- 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;