[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YCJlcI5fYRoX/sOA@hirez.programming.kicks-ass.net>
Date: Tue, 9 Feb 2021 11:35:28 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: Josh Poimboeuf <jpoimboe@...hat.com>,
Thomas Gleixner <tglx@...utronix.de>
Cc: Miroslav Benes <mbenes@...e.cz>,
Nick Desaulniers <ndesaulniers@...gle.com>,
Julien Thierry <jthierry@...hat.com>,
Kees Cook <keescook@...omium.org>, x86@...nel.org,
linux-kernel@...r.kernel.org
Subject: Re: [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;
>
>
Powered by blists - more mailing lists