Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1307498 > unrolled thread
| Started by | Borislav Petkov <bp@alien8.de> |
|---|---|
| First post | 2016-01-12 15:50 +0100 |
| Last post | 2016-01-12 17:20 +0100 |
| Articles | 3 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH v15 06/25] x86/stacktool: Compile-time stack metadata validation Borislav Petkov <bp@alien8.de> - 2016-01-12 15:50 +0100
Re: [PATCH v15 06/25] x86/stacktool: Compile-time stack metadata validation Josh Poimboeuf <jpoimboe@redhat.com> - 2016-01-12 16:10 +0100
Re: [PATCH v15 06/25] x86/stacktool: Compile-time stack metadata validation Borislav Petkov <bp@alien8.de> - 2016-01-12 17:20 +0100
| From | Borislav Petkov <bp@alien8.de> |
|---|---|
| Date | 2016-01-12 15:50 +0100 |
| Subject | Re: [PATCH v15 06/25] x86/stacktool: Compile-time stack metadata validation |
| Message-ID | <qQ8qK-2kQ-21@gated-at.bofh.it> |
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.
[toc] | [next] | [standalone]
| From | Josh Poimboeuf <jpoimboe@redhat.com> |
|---|---|
| Date | 2016-01-12 16:10 +0100 |
| Message-ID | <qQ8K6-2Id-27@gated-at.bofh.it> |
| In reply to | #1307498 |
On Tue, Jan 12, 2016 at 03:48:29PM +0100, Borislav Petkov wrote: > 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$ This file is a straight copy from the kernel arch/x86/include/asm/insn.h file, and there's even a Makefile target which warns if there are any differences between the two. I figured it's such a minor issue that it wasn't worth the churn to fix both files. There are several other warnings from the copied files (insn.h and list.h) but again I figured it wasn't worth the churn to fix them all. I did run checkpatch on previous revisions of the patch set, though I admit I forgot to run it on this one, and so I missed the improperly formatted commit id reference in the list.h copy commit which you pointed out. Otherwise, all the remaining warnings seemed bogus to me. -- Josh
[toc] | [prev] | [next] | [standalone]
| From | Borislav Petkov <bp@alien8.de> |
|---|---|
| Date | 2016-01-12 17:20 +0100 |
| Message-ID | <qQ9PQ-3lA-9@gated-at.bofh.it> |
| In reply to | #1307518 |
On Tue, Jan 12, 2016 at 09:06:39AM -0600, Josh Poimboeuf wrote:
> This file is a straight copy from the kernel arch/x86/include/asm/insn.h
> file, and there's even a Makefile target which warns if there are any
> differences between the two. I figured it's such a minor issue that it
> wasn't worth the churn to fix both files.
That target could surely learn to ignore comments, I guess. You could
also kill that address in both files later, ontop, when you feel bored. :)
--
Regards/Gruss,
Boris.
ECO tip #101: Trim your mails when you reply.
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web