lkml.org 
[lkml]   [2018]   [Feb]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] objtool: Fix switch-table detection
On Thu, Feb 08, 2018 at 02:02:32PM +0100, Peter Zijlstra wrote:
>
> Linus reported that GCC-7.3 generated a switch-table construct that
> confused objtool. It turns out that, in particular due to KASAN, it is
> possible to have unrelated .rodata usage in between the .rodata setup
> for the switch-table and the following indirect jump.
>
> The simple linear reverse search from the indirect jump would hit upon
> the KASAN .rodata usage first and fail to find a switch_table,
> resulting in a spurious 'sibling call with modified stack frame'
> warning.
>
> Fix this by creating a 'jump-stack' which we can 'unwind' during
> reversal, thereby skipping over much of the in-between code.
>
> This is not fool proof by any means, but is sufficient to make the
> known cases work. Future work would be to construct more comprehensive
> flow analysis code.
>
> Also, since Josh keeps asking, add myself to MAINTAINERS.
>
> Cc: Josh Poimboeuf <jpoimboe@redhat.com>
> Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>

Thanks again for helping out with objtool maintainership!

No complaints from the 0-day bot, so:

Acked-by: Josh Poimboeuf <jpoimboe@redhat.com>

--
Josh

\
 
 \ /
  Last update: 2018-02-08 19:34    [W:0.038 / U:4.304 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site