lkml.org 
[lkml]   [2021]   [Feb]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 3/3] objtool: Support stack-swizzle
On Tue, Feb 09, 2021 at 10:16:03AM +0100, Peter Zijlstra wrote:
> @@ -2193,6 +2232,12 @@ static int update_cfi_state(struct instr
> /* mov reg, disp(%rsp) */
> save_reg(cfi, op->src.reg, CFI_CFA,
> op->dest.offset - cfi->stack_size);
> +
> + } else if (op->src.reg == CFI_SP && op->dest.offset == 0) {
> +
> + /* mov %rsp, (%reg); # setup a stack swizzle. */
> + cfi->vals[op->dest.reg].base = CFI_SP_INDIRECT;
> + cfi->vals[op->dest.reg].offset = cfi->cfa.offset;

I'll change that to:

cfi->vals[op->dest.reg].offset = cfa->offset;

To be more consistent with the rest of the code.

> }
>
> break;
>
>

\
 
 \ /
  Last update: 2021-02-09 11:46    [W:0.127 / U:0.984 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site