Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1213110

Re: [PATCH v11 00/20] Compile-time stack validation

From Josh Poimboeuf <jpoimboe@redhat.com>
Newsgroups linux.kernel
Subject Re: [PATCH v11 00/20] Compile-time stack validation
Date 2015-08-25 17:30 +0200
Message-ID <q1okG-213-15@gated-at.bofh.it> (permalink)
References <q11ep-2f3-3@gated-at.bofh.it> <q1hCA-P0-49@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue, Aug 25, 2015 at 10:05:00AM +0200, Ingo Molnar wrote:
> * Josh Poimboeuf <jpoimboe@redhat.com> wrote:
> >  lib/Kconfig.debug                         |  11 +
> >  scripts/Makefile                          |   1 +
> >  scripts/Makefile.build                    |  37 +-
> >  scripts/mod/Makefile                      |   2 +
> >  scripts/stackvalidate/Makefile            |  24 +
> >  scripts/stackvalidate/arch-x86.c          | 160 +++++
> >  scripts/stackvalidate/arch.h              |  44 ++
> >  scripts/stackvalidate/elf.c               | 427 +++++++++++++
> >  scripts/stackvalidate/elf.h               |  92 +++
> >  scripts/stackvalidate/list.h              | 217 +++++++
> >  scripts/stackvalidate/special.c           | 199 ++++++
> >  scripts/stackvalidate/special.h           |  42 ++
> >  scripts/stackvalidate/stackvalidate.c     | 976 ++++++++++++++++++++++++++++++
> >  43 files changed, 2803 insertions(+), 48 deletions(-)
> >  create mode 100644 Documentation/stack-validation.txt
> >  create mode 100644 arch/x86/include/asm/stackvalidate.h
> >  create mode 100644 include/linux/stackvalidate.h
> >  create mode 100644 scripts/stackvalidate/Makefile
> >  create mode 100644 scripts/stackvalidate/arch-x86.c
> >  create mode 100644 scripts/stackvalidate/arch.h
> >  create mode 100644 scripts/stackvalidate/elf.c
> >  create mode 100644 scripts/stackvalidate/elf.h
> >  create mode 100644 scripts/stackvalidate/list.h
> >  create mode 100644 scripts/stackvalidate/special.c
> >  create mode 100644 scripts/stackvalidate/special.h
> >  create mode 100644 scripts/stackvalidate/stackvalidate.c
> 
> Btw., would you be against putting scripts/stackvalidate/ into 
> tools/stackvalidate/ ?
> 
> That way it would be more generic, and could be used in a standalone fashion as 
> well I suspect. It would not change any of your current usage of it.
> 
> (The other Kbuild glue changes still need to be in scripts/.)

I like that idea.  It could indeed be useful for any other projects
which have asm code.  In fact the musl project has been trying to solve
similar problems with their CFI generation awk script.

It does have some kernel-isms related to the reading of special sections
(.altinstructions, __jump_table, etc).  But that should be harmless for
non-kernel code and could easily be factored out with a compile-time or
cmdline flag if needed.

BTW, since I'm planning on adding a CFI generation option to this tool,
I wonder if "stackvalidate" is a misnomer.  I can't think of anything
better.  Any naming ideas are welcome :-)

-- 
Josh
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v11 00/20] Compile-time stack validation Josh Poimboeuf <jpoimboe@redhat.com> - 2015-08-24 17:00 +0200
  Re: [PATCH v11 00/20] Compile-time stack validation Ingo Molnar <mingo@kernel.org> - 2015-08-25 10:20 +0200
    Re: [PATCH v11 00/20] Compile-time stack validation Josh Poimboeuf <jpoimboe@redhat.com> - 2015-08-25 17:30 +0200
      Re: [PATCH v11 00/20] Compile-time stack validation Ingo Molnar <mingo@kernel.org> - 2015-08-26 09:10 +0200
        Re: [PATCH v11 00/20] Compile-time stack validation Jiri Kosina <jikos@kernel.org> - 2015-08-26 10:50 +0200
        Re: [PATCH v11 00/20] Compile-time stack validation Josh Poimboeuf <jpoimboe@redhat.com> - 2015-08-27 15:20 +0200
          Re: [PATCH v11 00/20] Compile-time stack validation Ingo Molnar <mingo@kernel.org> - 2015-08-28 10:30 +0200
            Re: [PATCH v11 00/20] Compile-time stack validation Josh Poimboeuf <jpoimboe@redhat.com> - 2015-08-28 16:00 +0200
  Re: [PATCH v11 03/20] x86/stackvalidate: Compile-time stack  validation Andi Kleen <andi@firstfloor.org> - 2015-08-26 16:30 +0200
    Re: [PATCH v11 03/20] x86/stackvalidate: Compile-time stack  validation Josh Poimboeuf <jpoimboe@redhat.com> - 2015-08-27 16:40 +0200
      Re: [PATCH v11 03/20] x86/stackvalidate: Compile-time stack  validation Andi Kleen <andi@firstfloor.org> - 2015-08-28 19:30 +0200
        Re: [PATCH v11 03/20] x86/stackvalidate: Compile-time stack  validation Josh Poimboeuf <jpoimboe@redhat.com> - 2015-08-28 22:00 +0200

csiph-web