lkml.org 
[lkml]   [2021]   [Feb]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 0/3] objtool: Support the stack swizzle
On Tue, 9 Feb 2021, Peter Zijlstra wrote:

> Hi!
>
> Implement objtool support for the x86_64 stack swizzle pattern.
>
> This means we can use the minial stack swizzle:
>
> mov %rsp, (%[tos])
> mov %[tos], %rsp
> ...
> pop %rsp
>
> from inline asm, with arbitrary stack setup. The ORC data for the Top-of-Stack
> will use the SP_INDIRECT CFA base. In order for this to work, SP_INDIRECT needs
> to first dereference and then add the offset to find the next frame.
>
> Therefore we need to change SP_INDIRECT (which is currently unused) to mean:
> (%rsp) + offset.
>
> Changes since v1 include:
>
> - removed the !callee saved reg restriction by using the vals[] array
> over the regs[] array.
>
> - per the above, removed the patches creating the regs[] scratch space.
>
> - more comments.
>
> - rebased to tip/objtool/core

I haven't tested it, but it all looks good to me.

Reviewed-by: Miroslav Benes <mbenes@suse.cz>

M

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