Re: [PATCH v15 06/25] x86/stacktool: Compile-time stack metadata validation

From: Borislav Petkov
Date: Tue Jan 12 2016 - 09:48:48 EST


On Fri, Dec 18, 2015 at 06:39:20AM -0600, Josh Poimboeuf wrote:
> This adds a CONFIG_STACK_VALIDATION option which enables a host tool
> named stacktool which runs at compile time. It analyzes every .o file
> and ensures the validity of its stack metadata. It enforces a set of
> rules on asm code and C inline assembly code so that stack traces can be
> reliable.
>
> For each function, it recursively follows all possible code paths and
> validates the correct frame pointer state at each instruction.
>
> It also follows code paths involving special sections, like
> .altinstructions, __jump_table, and __ex_table, which can add
> alternative execution paths to a given instruction (or set of
> instructions). Similarly, it knows how to follow switch statements, for
> which gcc sometimes uses jump tables.

Have you run this through checkpatch?

Some of the warnings make sense, like:

ERROR: Do not include the paragraph about writing to the Free Software Foundation's mailing address from the sample GPL notice. The FSF has changed addresses in the past, and may do so again. Linux already includes a copy of the GPL.
#2496: FILE: tools/stacktool/arch/x86/insn/insn.h:17:
+ * along with this program; if not, write to the Free Software$

--
Regards/Gruss,
Boris.

ECO tip #101: Trim your mails when you reply.