linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v5 0/5] Introduce GCC plugin infrastructure
@ 2016-03-06 23:02 Emese Revfy
  2016-03-06 23:03 ` [PATCH v5 1/5] Shared library support Emese Revfy
                   ` (4 more replies)
  0 siblings, 5 replies; 32+ messages in thread
From: Emese Revfy @ 2016-03-06 23:02 UTC (permalink / raw)
  To: linux-kbuild
  Cc: pageexec, spender, kernel-hardening, mmarek, keescook, linux,
	fengguang.wu, dvyukov, linux-kernel

This patch set introduce the GCC plugin infrastructure with examples for testing
and documentation.

GCC plugins are loadable modules that provide extra features to the compiler.
They are useful for runtime instrumentation and static analysis.

The infrastructure supports all gcc versions from 4.5 to 6.0, building
out-of-tree modules and building in a separate directory. Cross-compilation
is supported too but currently only the x86 architecture enables plugins.

This infrastructure was ported from grsecurity/PaX. It is a CII project
supported by the Linux Foundation.

Emese Revfy (5):
 Shared library support
 GCC plugin infrastructure
 Add Cyclomatic complexity plugin
 Documentations of the GCC plugin infrastructre
 Add sancov plugin


Changes from v4:
 * Moved shared library support from the GCC plugin infrastructure patch into
   a different patch
 * Update gcc-*.h from PaX
   * Fixed gcc-common.h for gcc 6
   * Added pass cloning support to the gcc pass generators
 * Disable all plugins in vdso because it is userland code
 * Add sancov gcc plugin: another use case for gcc plugin support in the kernel
   is when there is a feature in the latest gcc version and we would like to use
   it with older gcc versions as well (e.g., distros).

Changes from v3:
 * Fix some indentation related warnings
   (Suggested by checkpatch.pl)
 * Add maintainer entries
 * Don't run gcc_plugin.sh when the GCC_PLUGINS option is disabled or unsupported
   (Reported-by: Fengguang Wu <fengguang.wu@intel.com>)

Changes from v2:
 * Fixed incorrectly encoded characters
 * Generate the GIMPLE, IPA, SIMPLE_IPA and RTL pass structures
   (Suggested-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>)
 * Write plugin related warning messages to stderr instead of stdout
   (Suggested-by: Kees Cook <keescook@chromium.org>)
 * Mention the installation of the gcc plugin headers (Documentation)

Changes from v1:
 * Move the gcc-plugins make target into a separate Makefile because there may
   be a lot of plugins (Suggested-by: Rasmus Villemoes)
 * Simplify the dependencies of the plugin related config option
   (Suggested-by: Kees Cook <keescook@chromium.org>)
 * Removed the unnecessary example plugin

---
 Documentation/dontdiff                   |   1 +
 Documentation/gcc-plugins.txt            |  82 ++++++++++++++++++
 MAINTAINERS                              |   8 ++
 Makefile                                 |  41 ++++++---
 arch/Kconfig                             |  36 ++++++++
 arch/x86/Kconfig                         |   1 +
 arch/x86/entry/vdso/Makefile             |   2 +-
 init/Makefile                            |   3 +
 scripts/Makefile.gcc-plugins             |  35 ++++++++
 scripts/gcc-plugin.sh                    |  51 +++++++++++
 scripts/link-vmlinux.sh                  |   2 +-
 scripts/package/builddeb                 |   1 +
 tools/gcc/Makefile                       |  21 +++++
 tools/gcc/cyc_complexity_plugin.c        |  73 ++++++++++++++++
 tools/gcc/gcc-common.h                   | 830 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 tools/gcc/gcc-generate-gimple-pass.h     | 175 ++++++++++++++++++++++++++++++++++++++
 tools/gcc/gcc-generate-ipa-pass.h        | 289 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 tools/gcc/gcc-generate-rtl-pass.h        | 175 ++++++++++++++++++++++++++++++++++++++
 tools/gcc/gcc-generate-simple_ipa-pass.h | 175 ++++++++++++++++++++++++++++++++++++++
 tools/gcc/sancov_plugin.c                | 133 +++++++++++++++++++++++++++++
 20 files changed, 2121 insertions(+), 13 deletions(-)

^ permalink raw reply	[flat|nested] 32+ messages in thread

end of thread, other threads:[~2016-04-02  4:32 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-06 23:02 [PATCH v5 0/5] Introduce GCC plugin infrastructure Emese Revfy
2016-03-06 23:03 ` [PATCH v5 1/5] Shared library support Emese Revfy
2016-03-07 21:05   ` Kees Cook
2016-03-07 21:32     ` Emese Revfy
2016-03-11  6:19   ` Masahiro Yamada
2016-03-14 20:14     ` Emese Revfy
2016-03-16  7:50       ` Masahiro Yamada
2016-03-06 23:04 ` [PATCH v5 2/5] GCC plugin infrastructure Emese Revfy
2016-03-09  9:01   ` [kernel-hardening] " David Brown
2016-03-09 20:50     ` Kees Cook
2016-03-09 22:07       ` Emese Revfy
2016-03-09 22:03     ` Emese Revfy
2016-03-11  6:25   ` Masahiro Yamada
2016-03-14 20:52     ` Emese Revfy
2016-03-16  7:41       ` Masahiro Yamada
2016-03-16 21:06         ` Emese Revfy
2016-03-14 21:25     ` PaX Team
2016-03-16  7:34       ` Masahiro Yamada
2016-03-16 12:49         ` PaX Team
2016-03-17  4:09           ` Masahiro Yamada
2016-03-24  0:07     ` Emese Revfy
2016-03-26  2:39       ` Masahiro Yamada
2016-03-27 21:09         ` Emese Revfy
2016-04-02  4:32           ` Masahiro Yamada
2016-03-06 23:05 ` [PATCH v5 3/5] Add Cyclomatic complexity GCC plugin Emese Revfy
2016-03-11  6:26   ` Masahiro Yamada
2016-03-14 21:02     ` Emese Revfy
2016-03-06 23:06 ` [PATCH v5 4/5] Documentation for the GCC plugin infrastructure Emese Revfy
2016-03-06 23:07 ` [PATCH v5 5/5] Add sancov plugin Emese Revfy
2016-03-07 21:07   ` Kees Cook
2016-03-07 21:29     ` Emese Revfy
2016-03-08 10:54     ` Dmitry Vyukov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).