lkml.org 
[lkml]   [2023]   [Apr]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3/3] objtool: Generate ORC data for __pfx code
On Thu, Apr 13, 2023 at 01:24:26PM +0200, Peter Zijlstra wrote:
> > + if (!insn->cfi) {
> > + /*
> > + * This can happen if stack validation isn't enabled or the
> > + * function is annotated with STACK_FRAME_NON_STANDARD.
> > + */
> > + return 0;
> > + }
> > +
> > + /* Propagate insn->cfi to the prefix code */
> > + cfi = cfi_hash_find_or_add(insn->cfi);
> > + for (; prev != insn; prev = next_insn_same_sec(file, prev))
> > + prev->cfi = cfi;
> > +
> > return 0;
> > }
>
> FWIW, this makes the whole thing hard rely on the prefix being single
> byte NOPs -- which they are, but perhaps we should assert this?

Couldn't they be any stack-invariant instructions?

--
Josh

\
 
 \ /
  Last update: 2023-04-13 19:07    [W:0.159 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site