lkml.org 
[lkml]   [2017]   [Mar]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 03/10] x86: assembly, use SYM_FUNC_END for functions

* Josh Poimboeuf <jpoimboe@redhat.com> wrote:

> On Mon, Mar 20, 2017 at 01:32:15PM +0100, Jiri Slaby wrote:
> > ENTRY(ftrace_caller)
> > /* save_mcount_regs fills in first two parameters */
> > @@ -184,11 +184,12 @@ GLOBAL(ftrace_epilogue)
> > GLOBAL(ftrace_graph_call)
> > jmp ftrace_stub
> > #endif
> > +SYM_FUNC_END(ftrace_caller)
> >
> > /* This is weak to keep gas from relaxing the jumps */
> > WEAK(ftrace_stub)
> > retq
> > -END(ftrace_caller)
> > +SYM_FUNC_END(ftrace_caller)
>
> This gives ftrace_caller() two ends.

Such errors too could be detected automatically via objtool or some other symbol
debug mechanism.

The reason it might be a good fit for objtool is to make the checking optional (no
need to burden a regular build with it), plus objtool already looks at the .o from
first principles - a symbol checking sub-functionality could analyze the symbol
names in the same pass.

If we want to complicate things with CFI then we absolutely should increase the
quality of our symbol names space.

Thanks,

Ingo

\
 
 \ /
  Last update: 2017-03-22 08:34    [W:1.123 / U:0.664 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site