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 <doebel@amazon.de>
Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Reviewed-by: Ross Lagerwall <ross.lagerwall@citrix.com>
(cherry picked from commit 5142dc5c25)
This commit is contained in:
Bjoern Doebel authored and Andrew Cooper committed 2022-03-28 12:50:23 +01:00
1 parent 10b09aa254
commit 1e595d9c2b
1 file changed
+2 -2
+2 -2
View File
@@ -685,11 +685,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;
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.