On 07.03.2022 22:13, Bjoern Doebel wrote:
> @@ -159,7 +200,11 @@ void noinline arch_livepatch_apply(struct livepatch_func 
> *func)
>   */
>  void noinline arch_livepatch_revert(const struct livepatch_func *func)
>  {
> -    memcpy(func->old_addr, func->opaque, livepatch_insn_len(func));
> +    struct x86_livepatch_meta *lp;

Repeating my comment here a 3rd time (sorry): const please (and
generally wherever possible).

Jan

> +    lp = (struct x86_livepatch_meta *)func->opaque;
> +
> +    memcpy(func->old_addr + lp->patch_offset, lp->instruction, 
> livepatch_insn_len(func));
>  }
>  
>  /*


Reply via email to