Skip to contentSkip to conversation

Introduce GCC plugin infrastructure

PATCH Superseded Emese Revfy 5 participants 16 messages Apr 7, 2016 – Apr 21, 2016

Subsystems (9)

v6 of 9 Superseded Latest is v9 →

lore
Share & tools
lore
#0 lore raw

v6 cover Introduce GCC plugin infrastructure

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, arm and arm64 architectures enables plugins.

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

Emese Revfy (6):
Shared library support
GCC plugin infrastructure
The GCC plugin infrastructure supports the arm and arm64 architectures too Add Cyclomatic complexity plugin
Documentations of the GCC plugin infrastructre
Add sancov plugin

Changes from v5:
* Set important properties on the external fndecl (Add sancov plugin)
* Revert documentation change too (Shared library support)
(Suggested-by: Kees Cook <[email protected]>)
* The GCC plugin infrastructure now supports the arm and arm64 architectures too (Signed-off-by: David Brown <[email protected]>)
* Simplify the computation of PLUGINCC (GCC plugin infrastructure) (Suggested-by: Masahiro Yamada <[email protected]>)
* Simplify the invocation of gcc-plugin.sh (GCC plugin infrastructure) (Suggested-by: Masahiro Yamada <[email protected]>)
* Make use of multi-depend (Shared library support)
(Suggested-by: Masahiro Yamada <[email protected]>)
* Remove unnecessary exports (GCC plugin infrastructure)
(Suggested-by: Masahiro Yamada <[email protected]>)
* Simplify Makefile by using addprefix (GCC plugin infrastructure) (Suggested-by: Masahiro Yamada <[email protected]>)
* Moved the gcc plugins from tools/ to scripts/ (GCC plugin infrastructure) (Suggested-by: Masahiro Yamada <[email protected]>)
* Removed plugins from KBUILD_CFLAGS_32 (GCC plugin infrastructure)
* Remove gcc-plugin target everywhere
(Suggested-by and partly Written-by: Masahiro Yamada <[email protected]>)
* There is no leaf gcc attribute in gcc-4.5 (Add sancov plugin)
* Added support to the sancov plugin with kcov (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 <[email protected]>)

Changes from v2:
* Fixed incorrectly encoded characters
* Generate the GIMPLE, IPA, SIMPLE_IPA and RTL pass structures (Suggested-by: Rasmus Villemoes <[email protected]>)
* Write plugin related warning messages to stderr instead of stdout (Suggested-by: Kees Cook <[email protected]>)
* 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 <[email protected]>)
* Removed the unnecessary example plugin

---
 Documentation/dontdiff                             |   1 +
 Documentation/gcc-plugins.txt                      |  83 +++
 Documentation/kbuild/makefiles.txt                 |  39 +-
 MAINTAINERS                                        |   8 +
 Makefile                                           |  42 +-
 arch/Kconfig                                       |  36 +
 arch/arm/Kconfig                                   |   1 +
 arch/arm64/Kconfig                                 |   1 +
 arch/x86/Kconfig                                   |   1 +
 arch/x86/entry/vdso/Makefile                       |   3 +-
 init/Makefile                                      |   3 +
 lib/Kconfig.debug                                  |   2 +
 scripts/Makefile                                   |   2 +-
 scripts/Makefile.build                             |   2 +-
 scripts/Makefile.clean                             |   3 +-
 scripts/Makefile.gcc-plugins                       |  29 +
 scripts/Makefile.host                              |  70 +-
 scripts/gcc-plugin.sh                              |  51 ++
 scripts/gcc-plugins/Makefile                       |  21 +
 scripts/gcc-plugins/cyc_complexity_plugin.c        |  73 ++
 scripts/gcc-plugins/gcc-common.h                   | 830 +++++++++++++++++++++
 scripts/gcc-plugins/gcc-generate-gimple-pass.h     | 175 +++++
 scripts/gcc-plugins/gcc-generate-ipa-pass.h        | 289 +++++++
 scripts/gcc-plugins/gcc-generate-rtl-pass.h        | 175 +++++
 scripts/gcc-plugins/gcc-generate-simple_ipa-pass.h | 175 +++++
 scripts/gcc-plugins/sancov_plugin.c                | 143 ++++
 scripts/link-vmlinux.sh                            |   2 +-
 scripts/package/builddeb                           |   1 +
 28 files changed, 2241 insertions(+), 20 deletions(-)
#1 lore raw

PATCH v6 1/6 Shared library support

Infrastructure for building independent shared library targets. This effectively also reverts commit 62e2210798ed38928ab24841e8b4878a (Masahiro Yamada, kbuild: drop shared library support from Makefile.host).

---
 Documentation/kbuild/makefiles.txt | 39 ++++++++++++++++-----
 scripts/Makefile.build             |  2 +-
 scripts/Makefile.clean             |  3 +-
 scripts/Makefile.host              | 70 +++++++++++++++++++++++++++++++++++++-
 4 files changed, 103 insertions(+), 11 deletions(-)
Documentation/kbuild/makefiles.txt +31 -8
index 13f888a..250729b 100644
@@ -23,10 +23,11 @@ This document describes the Linux kernel Makefiles.
 	=== 4 Host Program support
 	   --- 4.1 Simple Host Program
 	   --- 4.2 Composite Host Programs
-	   --- 4.3 Using C++ for host programs
-	   --- 4.4 Controlling compiler options for host programs
-	   --- 4.5 When host programs are actually built
-	   --- 4.6 Using hostprogs-$(CONFIG_FOO)
+	   --- 4.3 Defining shared libraries
+	   --- 4.4 Using C++ for host programs
+	   --- 4.5 Controlling compiler options for host programs
+	   --- 4.6 When host programs are actually built
+	   --- 4.7 Using hostprogs-$(CONFIG_FOO)
 
 	=== 5 Kbuild clean infrastructure
 
@@ -643,7 +644,29 @@ Both possibilities are described in the following.
 	Finally, the two .o files are linked to the executable, lxdialog.
 	Note: The syntax <executable>-y is not permitted for host-programs.
 
---- 4.3 Using C++ for host programs
+--- 4.3 Defining shared libraries
+
+	Objects with extension .so are considered shared libraries, and
+	will be compiled as position independent objects.
+	Kbuild provides support for shared libraries, but the usage
+	shall be restricted.
+	In the following example the libkconfig.so shared library is used
+	to link the executable conf.
+
+	Example:
+		#scripts/kconfig/Makefile
+		hostprogs-y     := conf
+		conf-objs       := conf.o libkconfig.so
+		libkconfig-objs := expr.o type.o
+
+	Shared libraries always require a corresponding -objs line, and
+	in the example above the shared library libkconfig is composed by
+	the two objects expr.o and type.o.
+	expr.o and type.o will be built as position independent code and
+	linked as a shared library libkconfig.so. C++ is not supported for
+	shared libraries.
+
+--- 4.4 Using C++ for host programs
 
 	kbuild offers support for host programs written in C++. This was
 	introduced solely to support kconfig, and is not recommended
@@ -666,7 +689,7 @@ Both possibilities are described in the following.
 		qconf-cxxobjs := qconf.o
 		qconf-objs    := check.o
 
---- 4.4 Controlling compiler options for host programs
+--- 4.5 Controlling compiler options for host programs
 
 	When compiling host programs, it is possible to set specific flags.
 	The programs will always be compiled utilising $(HOSTCC) passed
@@ -694,7 +717,7 @@ Both possibilities are described in the following.
 	When linking qconf, it will be passed the extra option
 	"-L$(QTDIR)/lib".
 
---- 4.5 When host programs are actually built
+--- 4.6 When host programs are actually built
 
 	Kbuild will only build host-programs when they are referenced
 	as a prerequisite.
@@ -725,7 +748,7 @@ Both possibilities are described in the following.
 	This will tell kbuild to build lxdialog even if not referenced in
 	any rule.
 
---- 4.6 Using hostprogs-$(CONFIG_FOO)
+--- 4.7 Using hostprogs-$(CONFIG_FOO)
 
 	A typical pattern in a Kbuild file looks like this:
 
scripts/Makefile.build +1 -1
index e1bc190..b2ce235 100644
@@ -60,7 +60,7 @@ endif
 endif
 
 # Do not include host rules unless needed
-ifneq ($(hostprogs-y)$(hostprogs-m),)
+ifneq ($(hostprogs-y)$(hostprogs-m)$(hostlibs-y)$(hostlibs-m)$(hostcxxlibs-y)$(hostcxxlibs-m),)
 include scripts/Makefile.host
 endif
 
scripts/Makefile.clean +2 -1
index 55c96cb..e4e88ab 100644
@@ -38,7 +38,8 @@ subdir-ymn	:= $(addprefix $(obj)/,$(subdir-ymn))
 __clean-files	:= $(extra-y) $(extra-m) $(extra-)       \
 		   $(always) $(targets) $(clean-files)   \
 		   $(host-progs)                         \
-		   $(hostprogs-y) $(hostprogs-m) $(hostprogs-)
+		   $(hostprogs-y) $(hostprogs-m) $(hostprogs-) \
+		   $(hostlibs-y) $(hostlibs-m) $(hostlibs-)
 
 __clean-files   := $(filter-out $(no-clean-files), $(__clean-files))
 
scripts/Makefile.host +69 -1

93 lines not on this page · raw message

Signature · 1 line
2.4.1
#2 lore raw

PATCH v6 2/6 GCC plugin infrastructure

In reply to Emese Revfy

This patch allows to build the whole kernel with GCC plugins. It was ported from grsecurity/PaX. The infrastructure supports building out-of-tree modules and building in a separate directory. Cross-compilation is supported too but currently only the x86 architecture enables plugins.

The directory of the gcc plugins is tools/gcc. You can use a file or a directory there. The plugins compile with these options:
* -fno-rtti: gcc is compiled with this option so the plugins must use it too
* -fno-exceptions: this is inherited from gcc too
* -fasynchronous-unwind-tables: this is inherited from gcc too
* -ggdb: it is useful for debugging a plugin (better backtrace on internal errors)
* -Wno-narrowing: to suppress warnings from gcc headers (ipa-utils.h)
* -Wno-unused-variable: to suppress warnings from gcc headers (gcc_version variable, plugin-version.h)

The infrastructure introduces a new Makefile target called gcc-plugins. It supports all gcc versions from 4.5 to 6.0. The scripts/gcc-plugin.sh script chooses the proper host compiler (gcc-4.7 can be built by either gcc or g++). This script also checks the availability of the included headers in tools/gcc/gcc-common.h.

The gcc-common.h header contains frequently included headers for GCC plugins and it has a compatibility layer for the supported gcc versions.

The gcc-generate-*-pass.h headers automatically generate the registration structures for GIMPLE, SIMPLE_IPA, IPA and RTL passes.

Note that 'make clean' keeps the *.so files (only the distclean or mrproper targets clean all) because they are needed for out-of-tree modules.

---
 Documentation/dontdiff                             |   1 +
 MAINTAINERS                                        |   8 +
 Makefile                                           |  34 +-
 arch/Kconfig                                       |  13 +
 arch/x86/Kconfig                                   |   1 +
 arch/x86/entry/vdso/Makefile                       |   3 +-
 init/Makefile                                      |   3 +
 scripts/Makefile                                   |   2 +-
 scripts/Makefile.gcc-plugins                       |  18 +
 scripts/gcc-plugin.sh                              |  51 ++
 scripts/gcc-plugins/Makefile                       |  15 +
 scripts/gcc-plugins/gcc-common.h                   | 830 +++++++++++++++++++++
 scripts/gcc-plugins/gcc-generate-gimple-pass.h     | 175 +++++
 scripts/gcc-plugins/gcc-generate-ipa-pass.h        | 289 +++++++
 scripts/gcc-plugins/gcc-generate-rtl-pass.h        | 175 +++++
 scripts/gcc-plugins/gcc-generate-simple_ipa-pass.h | 175 +++++
 scripts/link-vmlinux.sh                            |   2 +-
 scripts/package/builddeb                           |   1 +
 18 files changed, 1790 insertions(+), 6 deletions(-)
 create mode 100644 scripts/Makefile.gcc-plugins
 create mode 100644 scripts/gcc-plugin.sh
 create mode 100644 scripts/gcc-plugins/Makefile
 create mode 100644 scripts/gcc-plugins/gcc-common.h
 create mode 100644 scripts/gcc-plugins/gcc-generate-gimple-pass.h
 create mode 100644 scripts/gcc-plugins/gcc-generate-ipa-pass.h
 create mode 100644 scripts/gcc-plugins/gcc-generate-rtl-pass.h
 create mode 100644 scripts/gcc-plugins/gcc-generate-simple_ipa-pass.h
Documentation/dontdiff +1 -0
index 8ea834f..5385cba 100644
@@ -3,6 +3,7 @@
 *.bc
 *.bin
 *.bz2
+*.c.[012]*.*
 *.cis
 *.cpio
 *.csp
MAINTAINERS +8 -0
index 0919fed..4463502 100644
@@ -4763,6 +4763,14 @@ L:	[email protected]
 S:	Odd Fixes (e.g., new signatures)
 F:	drivers/scsi/fdomain.*
 
+GCC PLUGINS
+M:	Kees Cook <[email protected]>
+R:	Emese Revfy <[email protected]>
+L:	[email protected]
+S:	Maintained
+F:	scripts/gcc-plugins/
+F:	Documentation/gcc-plugins.txt
+
 GCOV BASED KERNEL PROFILING
 M:	Peter Oberparleiter <[email protected]>
 S:	Maintained
Makefile +31 -3
index 173437d..3af7b9e 100644
@@ -418,6 +418,8 @@ export KBUILD_AFLAGS_MODULE KBUILD_CFLAGS_MODULE KBUILD_LDFLAGS_MODULE
 export KBUILD_AFLAGS_KERNEL KBUILD_CFLAGS_KERNEL
 export KBUILD_ARFLAGS
 
+export PLUGINCC GCC_PLUGINS_CFLAGS GCC_PLUGINS_AFLAGS
+
 # When compiling out-of-tree modules, put MODVERDIR in the module
 # tree rather than in the kernel tree. The kernel tree might
 # even be read-only.
@@ -548,7 +550,7 @@ ifeq ($(KBUILD_EXTMOD),)
 # in parallel
 PHONY += scripts
 scripts: scripts_basic include/config/auto.conf include/config/tristate.conf \
-	 asm-generic
+	 asm-generic gcc-plugins
 	$(Q)$(MAKE) $(build)=$(@)
 
 # Objects we will link into vmlinux / subdirs we need to visit
@@ -623,6 +625,15 @@ endif
 # Tell gcc to never replace conditional load with a non-conditional one
 KBUILD_CFLAGS	+= $(call cc-option,--param=allow-store-data-races=0)
 
+PHONY += gcc-plugins
+gcc-plugins: scripts_basic
+ifdef CONFIG_GCC_PLUGINS
+	$(Q)$(MAKE) $(build)=scripts/gcc-plugins
+endif
+	@:
+
+include scripts/Makefile.gcc-plugins
+
 ifdef CONFIG_READABLE_ASM
 # Disable optimizations that make assembler listings hard to read.
 # reorder blocks reorders the control in the function
@@ -949,6 +960,8 @@ endif
 
 # The actual objects are generated when descending,
 # make sure no implicit rule kicks in
+$(filter-out $(init-y),$(vmlinux-deps)): KBUILD_CFLAGS += $(GCC_PLUGINS_CFLAGS)
+$(filter-out $(init-y),$(vmlinux-deps)): KBUILD_AFLAGS += $(GCC_PLUGINS_AFLAGS)
 $(sort $(vmlinux-deps)): $(vmlinux-dirs) ;
 
 # Handle descending into subdirectories listed in $(vmlinux-dirs)
@@ -1001,10 +1014,13 @@ prepare1: prepare2 $(version_h) include/generated/utsrelease.h \
 
 archprepare: archheaders archscripts prepare1 scripts_basic
 
-prepare0: archprepare FORCE
+prepare0: KBUILD_CFLAGS += $(GCC_PLUGINS_CFLAGS)
+prepare0: KBUILD_AFLAGS += $(GCC_PLUGINS_AFLAGS)
+prepare0: archprepare gcc-plugins FORCE
 	$(Q)$(MAKE) $(build)=.
 
 # All the preparing..
+prepare: KBUILD_CFLAGS := $(filter-out $(GCC_PLUGINS_CFLAGS),$(KBUILD_CFLAGS))
 prepare: prepare0 prepare-objtool
 
 ifdef CONFIG_STACK_VALIDATION
@@ -1137,6 +1153,8 @@ all: modules
 # using awk while concatenating to the final file.
 
 PHONY += modules
+modules: KBUILD_CFLAGS += $(GCC_PLUGINS_CFLAGS)
+modules: KBUILD_AFLAGS += $(GCC_PLUGINS_AFLAGS)
 modules: $(vmlinux-dirs) $(if $(KBUILD_BUILTIN),vmlinux) modules.builtin
 	$(Q)$(AWK) '!x[$$0]++' $(vmlinux-dirs:%=$(objtree)/%/modules.order) > $(objtree)/modules.order
 	@$(kecho) '  Building modules, stage 2.';
@@ -1257,7 +1275,7 @@ distclean: mrproper
 	@find $(srctree) $(RCS_FIND_IGNORE) \
 		\( -name '*.orig' -o -name '*.rej' -o -name '*~' \
 		-o -name '*.bak' -o -name '#*#' -o -name '.*.orig' \
-		-o -name '.*.rej' -o -name '*%'  -o -name 'core' \) \
+		-o -name '.*.rej' -o -name '*.so' -o -name '*%' -o -name 'core' \) \
 		-type f -print | xargs rm -f
 
 
@@ -1426,6 +1444,8 @@ PHONY += $(module-dirs) modules
 $(module-dirs): crmodverdir $(objtree)/Module.symvers
 	$(Q)$(MAKE) $(build)=$(patsubst _module_%,%,$@)
 
+modules: KBUILD_CFLAGS += $(GCC_PLUGINS_CFLAGS)
+modules: KBUILD_AFLAGS += $(GCC_PLUGINS_AFLAGS)
 modules: $(module-dirs)
 	@$(kecho) '  Building modules, stage 2.';
 	$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost
@@ -1567,10 +1587,14 @@ else
         target-dir = $(if $(KBUILD_EXTMOD),$(dir $<),$(dir $@))
 endif
 
+%.s: KBUILD_CFLAGS += $(GCC_PLUGINS_CFLAGS)
+%.s: KBUILD_AFLAGS += $(GCC_PLUGINS_AFLAGS)
 %.s: %.c prepare scripts FORCE
 	$(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
 %.i: %.c prepare scripts FORCE
 	$(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
+%.o: KBUILD_CFLAGS += $(GCC_PLUGINS_CFLAGS)
+%.o: KBUILD_AFLAGS += $(GCC_PLUGINS_AFLAGS)
 %.o: %.c prepare scripts FORCE
 	$(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
 %.lst: %.c prepare scripts FORCE
@@ -1589,10 +1613,14 @@ endif
 	$(build)=$(build-dir)
 # Make sure the latest headers are built for Documentation
 Documentation/: headers_install
+%/: KBUILD_CFLAGS += $(GCC_PLUGINS_CFLAGS)
+%/: KBUILD_AFLAGS += $(GCC_PLUGINS_AFLAGS)
 %/: prepare scripts FORCE
 	$(cmd_crmodverdir)
 	$(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \
 	$(build)=$(build-dir)
+%.ko: KBUILD_CFLAGS += $(GCC_PLUGINS_CFLAGS)
+%.ko: KBUILD_AFLAGS += $(GCC_PLUGINS_AFLAGS)
 %.ko: prepare scripts FORCE
 	$(cmd_crmodverdir)
 	$(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1)   \
arch/Kconfig +13 -0
index 0f298f9..7c12571 100644
@@ -353,6 +353,19 @@ config SECCOMP_FILTER
 
 	  See Documentation/prctl/seccomp_filter.txt for details.
 
+config HAVE_GCC_PLUGINS
+	bool
+	help
+	  An arch should select this symbol if it supports building with
+	  GCC plugins.
+
+menuconfig GCC_PLUGINS
+	bool "GCC plugins"
+	depends on HAVE_GCC_PLUGINS
+	help
+	  GCC plugins are loadable modules that provide extra features to the
+	  compiler. They are useful for runtime instrumentation and static analysis.
+
 config HAVE_CC_STACKPROTECTOR
 	bool
 	help
arch/x86/Kconfig +1 -0
index 2632f60..ec45b7e 100644
@@ -155,6 +155,7 @@ config X86
 	select SYSCTL_EXCEPTION_TRACE
 	select USER_STACKTRACE_SUPPORT
 	select VIRT_TO_BUS
+	select HAVE_GCC_PLUGINS
 	select X86_DEV_DMA_OPS			if X86_64
 	select X86_FEATURE_NAMES		if PROC_FS
 	select HAVE_STACK_VALIDATION		if X86_64
arch/x86/entry/vdso/Makefile +2 -1
index 6874da5..8b1aa65 100644
@@ -75,7 +75,7 @@ CFL := $(PROFILING) -mcmodel=small -fPIC -O2 -fasynchronous-unwind-tables -m64 \
        -fno-omit-frame-pointer -foptimize-sibling-calls \
        -DDISABLE_BRANCH_PROFILING -DBUILD_VDSO
 
-$(vobjs): KBUILD_CFLAGS += $(CFL)
+$(vobjs): KBUILD_CFLAGS := $(filter-out $(GCC_PLUGINS_CFLAGS),$(KBUILD_CFLAGS)) $(CFL)
 
 #
 # vDSO code runs in userspace and -pg doesn't help with profiling anyway.
@@ -145,6 +145,7 @@ KBUILD_CFLAGS_32 := $(filter-out -m64,$(KBUILD_CFLAGS))
 KBUILD_CFLAGS_32 := $(filter-out -mcmodel=kernel,$(KBUILD_CFLAGS_32))
 KBUILD_CFLAGS_32 := $(filter-out -fno-pic,$(KBUILD_CFLAGS_32))
 KBUILD_CFLAGS_32 := $(filter-out -mfentry,$(KBUILD_CFLAGS_32))
+KBUILD_CFLAGS_32 := $(filter-out $(GCC_PLUGINS_CFLAGS),$(KBUILD_CFLAGS_32))
 KBUILD_CFLAGS_32 += -m32 -msoft-float -mregparm=0 -fpic
 KBUILD_CFLAGS_32 += $(call cc-option, -fno-stack-protector)
 KBUILD_CFLAGS_32 += $(call cc-option, -foptimize-sibling-calls)
init/Makefile +3 -0
index 7bc47ee..6da2dc7 100644
@@ -2,6 +2,9 @@
 # Makefile for the linux kernel.
 #
 
+ccflags-y := $(GCC_PLUGINS_CFLAGS)
+asflags-y := $(GCC_PLUGINS_AFLAGS)
+
 obj-y                          := main.o version.o mounts.o
 ifneq ($(CONFIG_BLK_DEV_INITRD),y)
 obj-y                          += noinitramfs.o
scripts/Makefile +1 -1
index 822ab4a..1d80897 100644
@@ -47,4 +47,4 @@ subdir-$(CONFIG_DTC)         += dtc
 subdir-$(CONFIG_GDB_SCRIPTS) += gdb
 
 # Let clean descend into subdirs
-subdir-	+= basic kconfig package
+subdir-	+= basic kconfig package gcc-plugins
scripts/Makefile.gcc-plugins new file +18 -0
new file mode 100644
index 0000000..b981b65
@@ -0,0 +1,18 @@
+ifdef CONFIG_GCC_PLUGINS
+  __PLUGINCC := $(call cc-ifversion, -ge, 0408, $(HOSTCXX), $(HOSTCC))
+  PLUGINCC := $(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-plugin.sh "$(__PLUGINCC)" "$(HOSTCXX)" "$(CC)")
+
+  GCC_PLUGINS_CFLAGS := $(addprefix -fplugin=$(objtree)/scripts/gcc-plugins/, $(gcc-plugin-y))
+
+  ifeq ($(PLUGINCC),)
+    ifneq ($(GCC_PLUGINS_CFLAGS),)
+      ifeq ($(call cc-ifversion, -ge, 0405, y), y)
+        $(shell $(CONFIG_SHELL) -x $(srctree)/scripts/gcc-plugin.sh "$(__PLUGINCC)" "$(HOSTCXX)" "$(CC)")
+        $(error error, your gcc installation does not support plugins, perhaps the necessary headers are missing?)
+      else
+	$(error error, your gcc version does not support plugins, you should upgrade it to gcc 4.5 at least)
+      endif
+    endif
+  endif
+
+endif
scripts/gcc-plugin.sh new file +51 -0

51 lines not on this page · raw message

scripts/gcc-plugins/Makefile new file +15 -0
new file mode 100644
index 0000000..b2d64af
@@ -0,0 +1,15 @@
+GCC_PLUGINS_DIR := $(shell $(CC) -print-file-name=plugin)
+
+ifeq ($(PLUGINCC),$(HOSTCC))
+HOSTLIBS := hostlibs
+HOST_EXTRACFLAGS += -I$(GCC_PLUGINS_DIR)/include -I$(src) -std=gnu99 -ggdb
+export HOST_EXTRACFLAGS
+else
+HOSTLIBS := hostcxxlibs
+HOST_EXTRACXXFLAGS += -I$(GCC_PLUGINS_DIR)/include -I$(src) -std=gnu++98 -fno-rtti -fno-exceptions -fasynchronous-unwind-tables -ggdb -Wno-narrowing -Wno-unused-variable
+export HOST_EXTRACXXFLAGS
+endif
+
+export GCCPLUGINS_DIR HOSTLIBS
+
+always := $($(HOSTLIBS)-y)
scripts/gcc-plugins/gcc-common.h new file +830 -0

830 lines not on this page · raw message

scripts/gcc-plugins/gcc-generate-gimple-pass.h new file +175 -0

175 lines not on this page · raw message

scripts/gcc-plugins/gcc-generate-ipa-pass.h new file +289 -0

289 lines not on this page · raw message

scripts/gcc-plugins/gcc-generate-rtl-pass.h new file +175 -0

175 lines not on this page · raw message

scripts/gcc-plugins/gcc-generate-simple_ipa-pass.h new file +175 -0

175 lines not on this page · raw message

scripts/link-vmlinux.sh +1 -1
index 49d61ad..69ee2cf 100755
@@ -184,7 +184,7 @@ else
 fi;
 
 # final build of init/
-${MAKE} -f "${srctree}/scripts/Makefile.build" obj=init
+${MAKE} -f "${srctree}/scripts/Makefile.build" obj=init GCC_PLUGINS_CFLAGS="${GCC_PLUGINS_CFLAGS}" GCC_PLUGINS_AFLAGS="${GCC_PLUGINS_AFLAGS}"
 
 kallsymso=""
 kallsyms_vmlinux=""
scripts/package/builddeb +1 -0
index 6c3b038..4bac93f 100755
@@ -326,6 +326,7 @@ fi
 (cd $srctree; find arch/$SRCARCH -name module.lds -o -name Kbuild.platforms -o -name Platform) >> "$objtree/debian/hdrsrcfiles"
 (cd $srctree; find $(find arch/$SRCARCH -name include -o -name scripts -type d) -type f) >> "$objtree/debian/hdrsrcfiles"
 (cd $objtree; find arch/$SRCARCH/include Module.symvers include scripts -type f) >> "$objtree/debian/hdrobjfiles"
+(cd $objtree; find scripts/gcc-plugins -name \*.so -o -name gcc-common.h) >> "$objtree/debian/hdrobjfiles"
 destdir=$kernel_headers_dir/usr/src/linux-headers-$version
 mkdir -p "$destdir"
 (cd $srctree; tar -c -f - -T -) < "$objtree/debian/hdrsrcfiles" | (cd $destdir; tar -xf -)
Signature · 1 line
2.4.1
#3 lore raw

Re: [PATCH v6 2/6] GCC plugin infrastructure

Hi Emese,

2016-04-08 6:13 GMT+09:00 Emese Revfy <[email protected]>:

Quoted 39 lines
Makefile +12 -1
index 173437d..3af7b9e 100644
@@ -418,6 +418,8 @@ export KBUILD_AFLAGS_MODULE KBUILD_CFLAGS_MODULE KBUILD_LDFLAGS_MODULE
 export KBUILD_AFLAGS_KERNEL KBUILD_CFLAGS_KERNEL
 export KBUILD_ARFLAGS
 
+export PLUGINCC GCC_PLUGINS_CFLAGS GCC_PLUGINS_AFLAGS
+
 # When compiling out-of-tree modules, put MODVERDIR in the module
 # tree rather than in the kernel tree. The kernel tree might
 # even be read-only.
@@ -548,7 +550,7 @@ ifeq ($(KBUILD_EXTMOD),)
 # in parallel
 PHONY += scripts
 scripts: scripts_basic include/config/auto.conf include/config/tristate.conf \
-        asm-generic
+        asm-generic gcc-plugins
        $(Q)$(MAKE) $(build)=$(@)
 
 # Objects we will link into vmlinux / subdirs we need to visit
@@ -623,6 +625,15 @@ endif
 # Tell gcc to never replace conditional load with a non-conditional one
 KBUILD_CFLAGS  += $(call cc-option,--param=allow-store-data-races=0)
 
+PHONY += gcc-plugins
+gcc-plugins: scripts_basic
+ifdef CONFIG_GCC_PLUGINS
+       $(Q)$(MAKE) $(build)=scripts/gcc-plugins
+endif
+       @:
+
+include scripts/Makefile.gcc-plugins
+
 ifdef CONFIG_READABLE_ASM
 # Disable optimizations that make assembler listings hard to read.
 # reorder blocks reorders the control in the function

Makefile endif · line 965

Quoted 6 lines
Makefile +2 -0
@@ -949,6 +960,8 @@ endif
 
 # The actual objects are generated when descending,
 # make sure no implicit rule kicks in
+$(filter-out $(init-y),$(vmlinux-deps)): KBUILD_CFLAGS += $(GCC_PLUGINS_CFLAGS)
+$(filter-out $(init-y),$(vmlinux-deps)): KBUILD_AFLAGS += $(GCC_PLUGINS_AFLAGS)
 $(sort $(vmlinux-deps)): $(vmlinux-dirs) ;

I do not get your intention here.

It looks like you are trying to omit plugin flags for init/ directory. (Actually this code is not working, though)

Then, you add plug the following lines to init/Makefile

+ccflags-y := $(GCC_PLUGINS_CFLAGS)
+asflags-y := $(GCC_PLUGINS_AFLAGS)

Quoted 63 lines
Makefile +14 -2
 # Handle descending into subdirectories listed in $(vmlinux-dirs)
@@ -1001,10 +1014,13 @@ prepare1: prepare2 $(version_h) include/generated/utsrelease.h \
 
 archprepare: archheaders archscripts prepare1 scripts_basic
 
-prepare0: archprepare FORCE
+prepare0: KBUILD_CFLAGS += $(GCC_PLUGINS_CFLAGS)
+prepare0: KBUILD_AFLAGS += $(GCC_PLUGINS_AFLAGS)
+prepare0: archprepare gcc-plugins FORCE
        $(Q)$(MAKE) $(build)=.
 
 # All the preparing..
+prepare: KBUILD_CFLAGS := $(filter-out $(GCC_PLUGINS_CFLAGS),$(KBUILD_CFLAGS))
 prepare: prepare0 prepare-objtool
 
 ifdef CONFIG_STACK_VALIDATION
@@ -1137,6 +1153,8 @@ all: modules
 # using awk while concatenating to the final file.
 
 PHONY += modules
+modules: KBUILD_CFLAGS += $(GCC_PLUGINS_CFLAGS)
+modules: KBUILD_AFLAGS += $(GCC_PLUGINS_AFLAGS)
 modules: $(vmlinux-dirs) $(if $(KBUILD_BUILTIN),vmlinux) modules.builtin
        $(Q)$(AWK) '!x[$$0]++' $(vmlinux-dirs:%=$(objtree)/%/modules.order) > $(objtree)/modules.order
        @$(kecho) '  Building modules, stage 2.';
@@ -1257,7 +1275,7 @@ distclean: mrproper
        @find $(srctree) $(RCS_FIND_IGNORE) \
                \( -name '*.orig' -o -name '*.rej' -o -name '*~' \
                -o -name '*.bak' -o -name '#*#' -o -name '.*.orig' \
-               -o -name '.*.rej' -o -name '*%'  -o -name 'core' \) \
+               -o -name '.*.rej' -o -name '*.so' -o -name '*%' -o -name 'core' \) \
                -type f -print | xargs rm -f
 
 
@@ -1426,6 +1444,8 @@ PHONY += $(module-dirs) modules
 $(module-dirs): crmodverdir $(objtree)/Module.symvers
        $(Q)$(MAKE) $(build)=$(patsubst _module_%,%,$@)
 
+modules: KBUILD_CFLAGS += $(GCC_PLUGINS_CFLAGS)
+modules: KBUILD_AFLAGS += $(GCC_PLUGINS_AFLAGS)
 modules: $(module-dirs)
        @$(kecho) '  Building modules, stage 2.';
        $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost
@@ -1567,10 +1587,14 @@ else
         target-dir = $(if $(KBUILD_EXTMOD),$(dir $<),$(dir $@))
 endif
 
+%.s: KBUILD_CFLAGS += $(GCC_PLUGINS_CFLAGS)
+%.s: KBUILD_AFLAGS += $(GCC_PLUGINS_AFLAGS)
 %.s: %.c prepare scripts FORCE
        $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
 %.i: %.c prepare scripts FORCE
        $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
+%.o: KBUILD_CFLAGS += $(GCC_PLUGINS_CFLAGS)
+%.o: KBUILD_AFLAGS += $(GCC_PLUGINS_AFLAGS)
 %.o: %.c prepare scripts FORCE
        $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
 %.lst: %.c prepare scripts FORCE
@@ -1589,10 +1613,14 @@ endif
        $(build)=$(build-dir)
 # Make sure the latest headers are built for Documentation
 Documentation/: headers_install
+%/: KBUILD_CFLAGS += $(GCC_PLUGINS_CFLAGS)

Makefile endif · line 1626

Quoted 10 lines
Makefile +3 -0
+%/: KBUILD_AFLAGS += $(GCC_PLUGINS_AFLAGS)
 %/: prepare scripts FORCE
        $(cmd_crmodverdir)
        $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \
        $(build)=$(build-dir)
+%.ko: KBUILD_CFLAGS += $(GCC_PLUGINS_CFLAGS)
+%.ko: KBUILD_AFLAGS += $(GCC_PLUGINS_AFLAGS)
 %.ko: prepare scripts FORCE
        $(cmd_crmodverdir)
        $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1)   \

Why do you need to sprinkle "KBUILD_CFLAGS += $(GCC_PLUGINS_CFLAGS)" here and there?

Unless I am missing something, I think the following should work.

Makefile +0 -2
index 5d65f4b..f85420b 100644
@@ -962,8 +962,6 @@ endif
 
 # The actual objects are generated when descending,
 # make sure no implicit rule kicks in
-$(filter-out $(init-y),$(vmlinux-deps)): KBUILD_CFLAGS += $(GCC_PLUGINS_CFLAGS)
-$(filter-out $(init-y),$(vmlinux-deps)): KBUILD_AFLAGS += $(GCC_PLUGINS_AFLAGS)
 $(sort $(vmlinux-deps)): $(vmlinux-dirs) ;
 
 # Handle descending into subdirectories listed in $(vmlinux-dirs)
@@ -1016,13 +1014,10 @@ prepare1: prepare2 $(version_h)

include/generated/utsrelease.h

archprepare: archheaders archscripts prepare1 scripts_basic

-prepare0: KBUILD_CFLAGS += $(GCC_PLUGINS_CFLAGS)
-prepare0: KBUILD_AFLAGS += $(GCC_PLUGINS_AFLAGS)
prepare0: archprepare gcc-plugins FORCE

        $(Q)$(MAKE) $(build)=.

# All the preparing..
-prepare: KBUILD_CFLAGS := $(filter-out $(GCC_PLUGINS_CFLAGS),$(KBUILD_CFLAGS))
prepare: prepare0 prepare-objtool

ifdef CONFIG_STACK_VALIDATION
@@ -1155,8 +1150,6 @@ all: modules

 # using awk while concatenating to the final file.

PHONY += modules
-modules: KBUILD_CFLAGS += $(GCC_PLUGINS_CFLAGS)
-modules: KBUILD_AFLAGS += $(GCC_PLUGINS_AFLAGS)
modules: $(vmlinux-dirs) $(if $(KBUILD_BUILTIN),vmlinux) modules.builtin

        $(Q)$(AWK) '!x[$$0]++'
$(vmlinux-dirs:%=$(objtree)/%/modules.order) > $(objtre
        @$(kecho) '  Building modules, stage 2.';
@@ -1446,8 +1439,6 @@ PHONY += $(module-dirs) modules
 $(module-dirs): crmodverdir $(objtree)/Module.symvers
        $(Q)$(MAKE) $(build)=$(patsubst _module_%,%,$@)

-modules: KBUILD_CFLAGS += $(GCC_PLUGINS_CFLAGS)
-modules: KBUILD_AFLAGS += $(GCC_PLUGINS_AFLAGS)
modules: $(module-dirs)

        @$(kecho) '  Building modules, stage 2.';
        $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost
@@ -1589,14 +1580,10 @@ else
         target-dir = $(if $(KBUILD_EXTMOD),$(dir $<),$(dir $@))

endif

-%.s: KBUILD_CFLAGS += $(GCC_PLUGINS_CFLAGS)
-%.s: KBUILD_AFLAGS += $(GCC_PLUGINS_AFLAGS)
%.s: %.c prepare scripts FORCE

        $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
 %.i: %.c prepare scripts FORCE
        $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
-%.o: KBUILD_CFLAGS += $(GCC_PLUGINS_CFLAGS)
-%.o: KBUILD_AFLAGS += $(GCC_PLUGINS_AFLAGS)
 %.o: %.c prepare scripts FORCE
        $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
 %.lst: %.c prepare scripts FORCE
@@ -1615,14 +1602,10 @@ endif
        $(build)=$(build-dir)

# Make sure the latest headers are built for Documentation Documentation/: headers_install
-%/: KBUILD_CFLAGS += $(GCC_PLUGINS_CFLAGS)
-%/: KBUILD_AFLAGS += $(GCC_PLUGINS_AFLAGS)
%/: prepare scripts FORCE

        $(cmd_crmodverdir)
        $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \
        $(build)=$(build-dir)
-%.ko: KBUILD_CFLAGS += $(GCC_PLUGINS_CFLAGS)
-%.ko: KBUILD_AFLAGS += $(GCC_PLUGINS_AFLAGS)
 %.ko: prepare scripts FORCE
        $(cmd_crmodverdir)
        $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1)   \
scripts/Makefile.gcc-plugins +2 -0
index 25a70fb..34d6224 100644
@@ -26,4 +26,6 @@ ifdef CONFIG_GCC_PLUGINS
     endif
   endif
 
+  KBUILD_CFLAGS += $(GCC_PLUGINS_CFLAGS)
+
 endif
Signature · 2 lines
Best Regards
Masahiro Yamada
#4 lore raw

Re: [PATCH v6 2/6] GCC plugin infrastructure

Quoted 244 lines · Masahiro Yamada

Hi Emese,

2016-04-08 6:13 GMT+09:00 Emese Revfy <[email protected]>:

Quoted 39 lines
Makefile +12 -1
index 173437d..3af7b9e 100644
@@ -418,6 +418,8 @@ export KBUILD_AFLAGS_MODULE KBUILD_CFLAGS_MODULE KBUILD_LDFLAGS_MODULE
 export KBUILD_AFLAGS_KERNEL KBUILD_CFLAGS_KERNEL
 export KBUILD_ARFLAGS
 
+export PLUGINCC GCC_PLUGINS_CFLAGS GCC_PLUGINS_AFLAGS
+
 # When compiling out-of-tree modules, put MODVERDIR in the module
 # tree rather than in the kernel tree. The kernel tree might
 # even be read-only.
@@ -548,7 +550,7 @@ ifeq ($(KBUILD_EXTMOD),)
 # in parallel
 PHONY += scripts
 scripts: scripts_basic include/config/auto.conf include/config/tristate.conf \
-        asm-generic
+        asm-generic gcc-plugins
        $(Q)$(MAKE) $(build)=$(@)
 
 # Objects we will link into vmlinux / subdirs we need to visit
@@ -623,6 +625,15 @@ endif
 # Tell gcc to never replace conditional load with a non-conditional one
 KBUILD_CFLAGS  += $(call cc-option,--param=allow-store-data-races=0)
 
+PHONY += gcc-plugins
+gcc-plugins: scripts_basic
+ifdef CONFIG_GCC_PLUGINS
+       $(Q)$(MAKE) $(build)=scripts/gcc-plugins
+endif
+       @:
+
+include scripts/Makefile.gcc-plugins
+
 ifdef CONFIG_READABLE_ASM
 # Disable optimizations that make assembler listings hard to read.
 # reorder blocks reorders the control in the function

Makefile endif · line 965

Quoted 6 lines
Makefile +2 -0
@@ -949,6 +960,8 @@ endif
 
 # The actual objects are generated when descending,
 # make sure no implicit rule kicks in
+$(filter-out $(init-y),$(vmlinux-deps)): KBUILD_CFLAGS += $(GCC_PLUGINS_CFLAGS)
+$(filter-out $(init-y),$(vmlinux-deps)): KBUILD_AFLAGS += $(GCC_PLUGINS_AFLAGS)
 $(sort $(vmlinux-deps)): $(vmlinux-dirs) ;

I do not get your intention here.

It looks like you are trying to omit plugin flags for init/ directory. (Actually this code is not working, though)

Then, you add plug the following lines to init/Makefile

(quoted diff) +2 -0
+ccflags-y := $(GCC_PLUGINS_CFLAGS)
+asflags-y := $(GCC_PLUGINS_AFLAGS)
Quoted 69 lines
Makefile +14 -2
 # Handle descending into subdirectories listed in $(vmlinux-dirs)
@@ -1001,10 +1014,13 @@ prepare1: prepare2 $(version_h) include/generated/utsrelease.h \
 
 archprepare: archheaders archscripts prepare1 scripts_basic
 
-prepare0: archprepare FORCE
+prepare0: KBUILD_CFLAGS += $(GCC_PLUGINS_CFLAGS)
+prepare0: KBUILD_AFLAGS += $(GCC_PLUGINS_AFLAGS)
+prepare0: archprepare gcc-plugins FORCE
        $(Q)$(MAKE) $(build)=.
 
 # All the preparing..
+prepare: KBUILD_CFLAGS := $(filter-out $(GCC_PLUGINS_CFLAGS),$(KBUILD_CFLAGS))
 prepare: prepare0 prepare-objtool
 
 ifdef CONFIG_STACK_VALIDATION
@@ -1137,6 +1153,8 @@ all: modules
 # using awk while concatenating to the final file.
 
 PHONY += modules
+modules: KBUILD_CFLAGS += $(GCC_PLUGINS_CFLAGS)
+modules: KBUILD_AFLAGS += $(GCC_PLUGINS_AFLAGS)
 modules: $(vmlinux-dirs) $(if $(KBUILD_BUILTIN),vmlinux) modules.builtin
        $(Q)$(AWK) '!x[$$0]++' $(vmlinux-dirs:%=$(objtree)/%/modules.order) > $(objtree)/modules.order
        @$(kecho) '  Building modules, stage 2.';
@@ -1257,7 +1275,7 @@ distclean: mrproper
        @find $(srctree) $(RCS_FIND_IGNORE) \
                \( -name '*.orig' -o -name '*.rej' -o -name '*~' \
                -o -name '*.bak' -o -name '#*#' -o -name '.*.orig' \
-               -o -name '.*.rej' -o -name '*%'  -o -name 'core' \) \
+               -o -name '.*.rej' -o -name '*.so' -o -name '*%' -o -name 'core' \) \
                -type f -print | xargs rm -f
 
 
@@ -1426,6 +1444,8 @@ PHONY += $(module-dirs) modules
 $(module-dirs): crmodverdir $(objtree)/Module.symvers
        $(Q)$(MAKE) $(build)=$(patsubst _module_%,%,$@)
 
+modules: KBUILD_CFLAGS += $(GCC_PLUGINS_CFLAGS)
+modules: KBUILD_AFLAGS += $(GCC_PLUGINS_AFLAGS)
 modules: $(module-dirs)
        @$(kecho) '  Building modules, stage 2.';
        $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost
@@ -1567,10 +1587,14 @@ else
         target-dir = $(if $(KBUILD_EXTMOD),$(dir $<),$(dir $@))
 endif
 
+%.s: KBUILD_CFLAGS += $(GCC_PLUGINS_CFLAGS)
+%.s: KBUILD_AFLAGS += $(GCC_PLUGINS_AFLAGS)
 %.s: %.c prepare scripts FORCE
        $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
 %.i: %.c prepare scripts FORCE
        $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
+%.o: KBUILD_CFLAGS += $(GCC_PLUGINS_CFLAGS)
+%.o: KBUILD_AFLAGS += $(GCC_PLUGINS_AFLAGS)
 %.o: %.c prepare scripts FORCE
        $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
 %.lst: %.c prepare scripts FORCE
@@ -1589,10 +1613,14 @@ endif
        $(build)=$(build-dir)
 # Make sure the latest headers are built for Documentation
 Documentation/: headers_install
+%/: KBUILD_CFLAGS += $(GCC_PLUGINS_CFLAGS)

Makefile endif · line 1626

Quoted 10 lines
Makefile +3 -0
+%/: KBUILD_AFLAGS += $(GCC_PLUGINS_AFLAGS)
 %/: prepare scripts FORCE
        $(cmd_crmodverdir)
        $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \
        $(build)=$(build-dir)
+%.ko: KBUILD_CFLAGS += $(GCC_PLUGINS_CFLAGS)
+%.ko: KBUILD_AFLAGS += $(GCC_PLUGINS_AFLAGS)
 %.ko: prepare scripts FORCE
        $(cmd_crmodverdir)
        $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1)   \

Why do you need to sprinkle "KBUILD_CFLAGS += $(GCC_PLUGINS_CFLAGS)" here and there?

Unless I am missing something, I think the following should work.

Makefile +0 -2
index 5d65f4b..f85420b 100644
@@ -962,8 +962,6 @@ endif
 
 # The actual objects are generated when descending,
 # make sure no implicit rule kicks in
-$(filter-out $(init-y),$(vmlinux-deps)): KBUILD_CFLAGS += $(GCC_PLUGINS_CFLAGS)
-$(filter-out $(init-y),$(vmlinux-deps)): KBUILD_AFLAGS += $(GCC_PLUGINS_AFLAGS)
 $(sort $(vmlinux-deps)): $(vmlinux-dirs) ;
 
 # Handle descending into subdirectories listed in $(vmlinux-dirs)
@@ -1016,13 +1014,10 @@ prepare1: prepare2 $(version_h)

include/generated/utsrelease.h

archprepare: archheaders archscripts prepare1 scripts_basic

Makefile +0 -5
-prepare0: KBUILD_CFLAGS += $(GCC_PLUGINS_CFLAGS)
-prepare0: KBUILD_AFLAGS += $(GCC_PLUGINS_AFLAGS)
 prepare0: archprepare gcc-plugins FORCE
        $(Q)$(MAKE) $(build)=.
 
 # All the preparing..
-prepare: KBUILD_CFLAGS := $(filter-out $(GCC_PLUGINS_CFLAGS),$(KBUILD_CFLAGS))
 prepare: prepare0 prepare-objtool
 
 ifdef CONFIG_STACK_VALIDATION
@@ -1155,8 +1150,6 @@ all: modules
 # using awk while concatenating to the final file.
 
 PHONY += modules
-modules: KBUILD_CFLAGS += $(GCC_PLUGINS_CFLAGS)
-modules: KBUILD_AFLAGS += $(GCC_PLUGINS_AFLAGS)
 modules: $(vmlinux-dirs) $(if $(KBUILD_BUILTIN),vmlinux) modules.builtin
        $(Q)$(AWK) '!x[$$0]++'

$(vmlinux-dirs:%=$(objtree)/%/modules.order) > $(objtre

        @$(kecho) '  Building modules, stage 2.';
Makefile +0 -10
@@ -1446,8 +1439,6 @@ PHONY += $(module-dirs) modules
 $(module-dirs): crmodverdir $(objtree)/Module.symvers
        $(Q)$(MAKE) $(build)=$(patsubst _module_%,%,$@)
 
-modules: KBUILD_CFLAGS += $(GCC_PLUGINS_CFLAGS)
-modules: KBUILD_AFLAGS += $(GCC_PLUGINS_AFLAGS)
 modules: $(module-dirs)
        @$(kecho) '  Building modules, stage 2.';
        $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost
@@ -1589,14 +1580,10 @@ else
         target-dir = $(if $(KBUILD_EXTMOD),$(dir $<),$(dir $@))
 endif
 
-%.s: KBUILD_CFLAGS += $(GCC_PLUGINS_CFLAGS)
-%.s: KBUILD_AFLAGS += $(GCC_PLUGINS_AFLAGS)
 %.s: %.c prepare scripts FORCE
        $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
 %.i: %.c prepare scripts FORCE
        $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
-%.o: KBUILD_CFLAGS += $(GCC_PLUGINS_CFLAGS)
-%.o: KBUILD_AFLAGS += $(GCC_PLUGINS_AFLAGS)
 %.o: %.c prepare scripts FORCE
        $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
 %.lst: %.c prepare scripts FORCE
@@ -1615,14 +1602,10 @@ endif
        $(build)=$(build-dir)
 # Make sure the latest headers are built for Documentation
 Documentation/: headers_install
-%/: KBUILD_CFLAGS += $(GCC_PLUGINS_CFLAGS)
-%/: KBUILD_AFLAGS += $(GCC_PLUGINS_AFLAGS)
 %/: prepare scripts FORCE
        $(cmd_crmodverdir)
        $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \
        $(build)=$(build-dir)
-%.ko: KBUILD_CFLAGS += $(GCC_PLUGINS_CFLAGS)
-%.ko: KBUILD_AFLAGS += $(GCC_PLUGINS_AFLAGS)
 %.ko: prepare scripts FORCE
        $(cmd_crmodverdir)
        $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1)   \
scripts/Makefile.gcc-plugins +2 -1
index 25a70fb..34d6224 100644
@@ -26,4 +26,6 @@ ifdef CONFIG_GCC_PLUGINS
     endif
   endif
 
+  KBUILD_CFLAGS += $(GCC_PLUGINS_CFLAGS)
+
 endif
 
 
 
 
 
 
--
Quoted 2 lines

Best Regards
Masahiro Yamada

Hi Emese,

Any update on this? I'd love to see if we can land the plug-in infrastructure soon.

Thanks!

-Kees

Signature · 2 lines
Kees Cook
Chrome OS & Brillo Security
#5 lore raw

PATCH v6 3/6 The GCC plugin infrastructure supports the arm and arm64 architectures too

In reply to Emese Revfy

The GCC plugin infrastructure now supports the arm and arm64 architectures too.

---
 arch/arm/Kconfig   | 1 +
 arch/arm64/Kconfig | 1 +
 2 files changed, 2 insertions(+)
arch/arm/Kconfig +1 -0
index 0846026..8f57eb6 100644
@@ -55,6 +55,7 @@ config ARM
 	select HAVE_FUNCTION_GRAPH_TRACER if (!THUMB2_KERNEL)
 	select HAVE_FUNCTION_TRACER if (!XIP_KERNEL)
 	select HAVE_GENERIC_DMA_COHERENT
+	select HAVE_GCC_PLUGINS
 	select HAVE_HW_BREAKPOINT if (PERF_EVENTS && (CPU_V6 || CPU_V6K || CPU_V7))
 	select HAVE_IDE if PCI || ISA || PCMCIA
 	select HAVE_IRQ_TIME_ACCOUNTING
arch/arm64/Kconfig +1 -0
index 4f43622..22c9473 100644
@@ -72,6 +72,7 @@ config ARM64
 	select HAVE_FTRACE_MCOUNT_RECORD
 	select HAVE_FUNCTION_TRACER
 	select HAVE_FUNCTION_GRAPH_TRACER
+	select HAVE_GCC_PLUGINS
 	select HAVE_GENERIC_DMA_COHERENT
 	select HAVE_HW_BREAKPOINT if PERF_EVENTS
 	select HAVE_IRQ_TIME_ACCOUNTING
Signature · 1 line
2.4.1
#6 lore raw

PATCH v6 4/6 Add Cyclomatic complexity GCC plugin

In reply to Emese Revfy

Add a very simple plugin to demonstrate the GCC plugin infrastructure. This GCC plugin computes the cyclomatic complexity of each function.

The complexity M of a function's control flow graph is defined as:
M = E - N + 2P
where
E = the number of edges
N = the number of nodes
P = the number of connected components (exit nodes).

---
 arch/Kconfig                                | 12 +++++
 scripts/Makefile.gcc-plugins                |  2 +
 scripts/gcc-plugins/Makefile                |  4 ++
 scripts/gcc-plugins/cyc_complexity_plugin.c | 73 +++++++++++++++++++++++++++++
 4 files changed, 91 insertions(+)
 create mode 100644 scripts/gcc-plugins/cyc_complexity_plugin.c
arch/Kconfig +12 -0
index 7c12571..ddf29b4 100644
@@ -366,6 +366,18 @@ menuconfig GCC_PLUGINS
 	  GCC plugins are loadable modules that provide extra features to the
 	  compiler. They are useful for runtime instrumentation and static analysis.
 
+config GCC_PLUGIN_CYC_COMPLEXITY
+	bool "Compute the cyclomatic complexity of a function"
+	depends on GCC_PLUGINS
+	help
+	  The complexity M of a function's control flow graph is defined as:
+	   M = E - N + 2P
+	  where
+
+	  E = the number of edges
+	  N = the number of nodes
+	  P = the number of connected components (exit nodes).
+
 config HAVE_CC_STACKPROTECTOR
 	bool
 	help
scripts/Makefile.gcc-plugins +2 -0
index b981b65..34ad58b 100644
@@ -2,6 +2,8 @@ ifdef CONFIG_GCC_PLUGINS
   __PLUGINCC := $(call cc-ifversion, -ge, 0408, $(HOSTCXX), $(HOSTCC))
   PLUGINCC := $(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-plugin.sh "$(__PLUGINCC)" "$(HOSTCXX)" "$(CC)")
 
+  gcc-plugin-$(CONFIG_GCC_PLUGIN_CYC_COMPLEXITY)	+= cyc_complexity_plugin.so
+
   GCC_PLUGINS_CFLAGS := $(addprefix -fplugin=$(objtree)/scripts/gcc-plugins/, $(gcc-plugin-y))
 
   ifeq ($(PLUGINCC),)
scripts/gcc-plugins/Makefile +4 -0
index b2d64af..31c72bf 100644
@@ -12,4 +12,8 @@ endif
 
 export GCCPLUGINS_DIR HOSTLIBS
 
+$(HOSTLIBS)-$(CONFIG_GCC_PLUGIN_CYC_COMPLEXITY) := cyc_complexity_plugin.so
+
 always := $($(HOSTLIBS)-y)
+
+cyc_complexity_plugin-objs := cyc_complexity_plugin.o
scripts/gcc-plugins/cyc_complexity_plugin.c new file +73 -0

73 lines not on this page · raw message

Signature · 1 line
2.4.1
#7 lore raw

PATCH v6 5/6 Documentation for the GCC plugin infrastructure

In reply to Emese Revfy

This is the GCC infrastructure documentation about its operation, how to add and use a new plugin with an example.

---
 Documentation/gcc-plugins.txt | 83 +++++++++++++++++++++++++++++++++++++++++++
 arch/Kconfig                  |  2 ++
 2 files changed, 85 insertions(+)
 create mode 100644 Documentation/gcc-plugins.txt
Documentation/gcc-plugins.txt new file +83 -0
new file mode 100644
index 0000000..9fa9bd2
@@ -0,0 +1,83 @@
+GCC plugin infrastructure
+=========================
+
+
+1. Introduction
+===============
+
+GCC plugins are loadable modules that provide extra features to the
+compiler [1]. They are useful for runtime instrumentation and static analysis.
+We can analyse, change and add further code during compilation via
+callbacks [2], GIMPLE [3], IPA [4] and RTL passes [5].
+
+The GCC plugin infrastructure of the kernel supports all gcc versions from
+4.5 to 6.0, building out-of-tree modules, cross-compilation and building in a
+separate directory.
+
+Currently the GCC plugin infrastructure supports only the x86, arm and arm64
+architectures.
+
+This infrastructure was ported from grsecurity [6] and PaX [7].
+
+--
+[1] https://gcc.gnu.org/onlinedocs/gccint/Plugins.html
+[2] https://gcc.gnu.org/onlinedocs/gccint/Plugin-API.html#Plugin-API
+[3] https://gcc.gnu.org/onlinedocs/gccint/GIMPLE.html
+[4] https://gcc.gnu.org/onlinedocs/gccint/IPA.html
+[5] https://gcc.gnu.org/onlinedocs/gccint/RTL.html
+[6] https://grsecurity.net/
+[7] https://pax.grsecurity.net/
+
+
+2. Files
+========
+
+$(src)/scripts/gcc-plugins
+	This is the directory of the GCC plugins.
+
+$(src)/scripts/gcc-plugins/gcc-common.h
+	This is a compatibility header for GCC plugins.
+	It should be always included instead of individual gcc headers.
+
+$(src)/scripts/gcc-plugin.sh
+	This script checks the availability of the included headers in
+	gcc-common.h and chooses the proper host compiler to build the plugins
+	(gcc-4.7 can be built by either gcc or g++).
+
+$(src)/scripts/gcc-plugins/gcc-generate-gimple-pass.h
+$(src)/scripts/gcc-plugins/gcc-generate-ipa-pass.h
+$(src)/scripts/gcc-plugins/gcc-generate-simple_ipa-pass.h
+$(src)/scripts/gcc-plugins/gcc-generate-rtl-pass.h
+	These headers automatically generate the registration structures for
+	GIMPLE, SIMPLE_IPA, IPA and RTL passes. They support all gcc versions
+	from 4.5 to 6.0.
+	They should be preferred to creating the structures by hand.
+
+
+3. Usage
+========
+
+You must install the gcc plugin headers for your gcc version,
+e.g., on Ubuntu for gcc-4.9:
+
+	apt-get install gcc-4.9-plugin-dev
+
+Enable a GCC plugin based feature in the kernel config:
+
+	CONFIG_GCC_PLUGIN_CYC_COMPLEXITY = y
+
+To compile only the plugin(s):
+
+	make gcc-plugins
+
+or just run the kernel make and compile the whole kernel with
+the cyclomatic complexity GCC plugin.
+
+
+4. How to add a new GCC plugin
+==============================
+
+The GCC plugins are in $(src)/scripts/gcc-plugins/. You can use a file or a directory
+here. It must be added to $(src)/scripts/gcc-plugins/Makefile,
+$(src)/scripts/Makefile.gcc-plugins and $(src)/arch/Kconfig.
+See the cyc_complexity_plugin.c (CONFIG_GCC_PLUGIN_CYC_COMPLEXITY) GCC plugin.
arch/Kconfig +2 -0
index ddf29b4..e783429 100644
@@ -366,6 +366,8 @@ menuconfig GCC_PLUGINS
 	  GCC plugins are loadable modules that provide extra features to the
 	  compiler. They are useful for runtime instrumentation and static analysis.
 
+	  See Documentation/gcc-plugins.txt for details.
+
 config GCC_PLUGIN_CYC_COMPLEXITY
 	bool "Compute the cyclomatic complexity of a function"
 	depends on GCC_PLUGINS
Signature · 1 line
2.4.1
#8 lore raw

PATCH v6 6/6 Add sancov plugin

In reply to Emese Revfy

The sancov gcc plugin inserts a __sanitizer_cov_trace_pc() call at the start of basic blocks.

This plugin is a helper plugin for the kcov feature. It supports all gcc versions with plugin support (from gcc-4.5 on).
It is based on the gcc commit "Add fuzzing coverage support" by Dmitry Vyukov
(https://gcc.gnu.org/viewcvs/gcc?limit_changes=0&view=revision&revision=231296).

---
 Makefile                            |   8 +-
 arch/Kconfig                        |   9 +++
 lib/Kconfig.debug                   |   2 +
 scripts/Makefile.gcc-plugins        |   9 +++
 scripts/gcc-plugins/Makefile        |   2 +
 scripts/gcc-plugins/sancov_plugin.c | 143 ++++++++++++++++++++++++++++++++++++
 6 files changed, 170 insertions(+), 3 deletions(-)
 create mode 100644 scripts/gcc-plugins/sancov_plugin.c
Makefile +5 -3
index 3af7b9e..e079cb4 100644
@@ -686,10 +686,12 @@ endif
 KBUILD_CFLAGS += $(stackp-flag)
 
 ifdef CONFIG_KCOV
-  ifeq ($(call cc-option, $(CFLAGS_KCOV)),)
-    $(warning Cannot use CONFIG_KCOV: \
+  ifneq ($(CFLAGS_KCOV),)
+    ifeq ($(call cc-option, $(CFLAGS_KCOV)),)
+      $(warning Cannot use CONFIG_KCOV: \
              -fsanitize-coverage=trace-pc is not supported by compiler)
-    CFLAGS_KCOV =
+      CFLAGS_KCOV =
+    endif
   endif
 endif
 
arch/Kconfig +9 -0
index e783429..5d856c8 100644
@@ -380,6 +380,15 @@ config GCC_PLUGIN_CYC_COMPLEXITY
 	  N = the number of nodes
 	  P = the number of connected components (exit nodes).
 
+config GCC_PLUGIN_SANCOV
+	bool
+	depends on GCC_PLUGINS
+	help
+	  This plugin inserts a __sanitizer_cov_trace_pc() call at the start of
+	  basic blocks. It supports all gcc versions with plugin support (from
+	  gcc-4.5 on). It is based on the commit "Add fuzzing coverage support"
+	  by Dmitry Vyukov <[email protected]>.
+
 config HAVE_CC_STACKPROTECTOR
 	bool
 	help
lib/Kconfig.debug +2 -0
index f4b797a..507d3fc 100644
@@ -707,6 +707,8 @@ config KCOV
 	bool "Code coverage for fuzzing"
 	depends on ARCH_HAS_KCOV
 	select DEBUG_FS
+	select GCC_PLUGINS
+	select GCC_PLUGIN_SANCOV
 	help
 	  KCOV exposes kernel code coverage information in a form suitable
 	  for coverage-guided fuzzing (randomized testing).
scripts/Makefile.gcc-plugins +9 -0
index 34ad58b..25a70fb 100644
@@ -4,6 +4,15 @@ ifdef CONFIG_GCC_PLUGINS
 
   gcc-plugin-$(CONFIG_GCC_PLUGIN_CYC_COMPLEXITY)	+= cyc_complexity_plugin.so
 
+  ifdef CONFIG_GCC_PLUGIN_SANCOV
+    ifeq ($(call cc-option, $(CFLAGS_KCOV)),)
+      gcc-plugin-$(CONFIG_GCC_PLUGIN_SANCOV)		+= sancov_plugin.so
+      ifneq ($(PLUGINCC),)
+        CFLAGS_KCOV =
+      endif
+    endif
+  endif
+
   GCC_PLUGINS_CFLAGS := $(addprefix -fplugin=$(objtree)/scripts/gcc-plugins/, $(gcc-plugin-y))
 
   ifeq ($(PLUGINCC),)
scripts/gcc-plugins/Makefile +2 -0
index 31c72bf..97a923f 100644
@@ -13,7 +13,9 @@ endif
 export GCCPLUGINS_DIR HOSTLIBS
 
 $(HOSTLIBS)-$(CONFIG_GCC_PLUGIN_CYC_COMPLEXITY) := cyc_complexity_plugin.so
+$(HOSTLIBS)-$(CONFIG_GCC_PLUGIN_SANCOV) += sancov_plugin.so
 
 always := $($(HOSTLIBS)-y)
 
 cyc_complexity_plugin-objs := cyc_complexity_plugin.o
+sancov_plugin-objs := sancov_plugin.o
scripts/gcc-plugins/sancov_plugin.c new file +143 -0

143 lines not on this page · raw message

Signature · 1 line
2.4.1
Tested-by on the v6 series
#9 lore raw
In reply to Emese Revfy
Quoted 13 lines · Emese Revfy

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, arm and arm64 architectures enables plugins.

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

Quoted 7 lines

Emese Revfy (6):
Shared library support
GCC plugin infrastructure
The GCC plugin infrastructure supports the arm and arm64 architectures too Add Cyclomatic complexity plugin
Documentations of the GCC plugin infrastructre
Add sancov plugin

I've tested the v6 patches on arm, and partially on arm64. The arm64 gcc has a bug in make install that doesn't install all necessary headers to build plugins. I believe the patch will work once that version gets out. It does, however, print a helpful message now explaining the likely cause of the failure.

#10 lore raw
Quoted 28 lines · David Brown
Quoted 18 lines · Emese Revfy

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, arm and arm64 architectures enables plugins.

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

Quoted 7 lines

Emese Revfy (6):
Shared library support
GCC plugin infrastructure
The GCC plugin infrastructure supports the arm and arm64 architectures too Add Cyclomatic complexity plugin
Documentations of the GCC plugin infrastructre
Add sancov plugin

Quoted 7 lines

I've tested the v6 patches on arm, and partially on arm64. The arm64 gcc has a bug in make install that doesn't install all necessary headers to build plugins. I believe the patch will work once that version gets out. It does, however, print a helpful message now explaining the likely cause of the failure.

Awesome! Thanks for testing this. I still need to finish getting my arm64 environment built...

Do you happen to know if there's already a gcc bug open for the make install problem?

Masahiro and Michal, does this series look good to you? I'd really like to get this into -next for wider testing.

Emese, were you thinking of doing the initify plugin next after this infrastructure lands?

-Kees

Signature · 2 lines
Kees Cook
Chrome OS & Brillo Security
#11 lore raw
Quoted 2 lines · Kees Cook

Awesome! Thanks for testing this. I still need to finish getting my arm64 environment built...

I've been using:
http://releases.linaro.org/components/toolchain/binaries/

for most stuff.

Quoted 2 lines

Do you happen to know if there's already a gcc bug open for the make install problem?

Linaro toolchain bug:
https://bugs.linaro.org/show_bug.cgi?id=2123

Patch to fix it
https://gcc.gnu.org/ml/gcc-patches/2016-03/msg00522.html

It is supposed to be included in the linaro 5.3-2016.03 snapshot. I've pinged Christophe to see if I can get any insight into when that will be available.

It is kind of nice to see that when it fails, it prints a helpful message, though:

scripts/Makefile.gcc-plugins:22: *** error, your gcc installation does not support plugins, perhaps the necessary headers are missing?. Stop.

I think it is OK to include this, even with the patches still bubbling through gcc releases. It prints a helpful message when it doesn't work, and is only going to be selected if specifically requested.

David

#12 lore raw
Quoted 18 lines · David Brown
Quoted 2 lines · Kees Cook

Awesome! Thanks for testing this. I still need to finish getting my arm64 environment built...

I've been using:
http://releases.linaro.org/components/toolchain/binaries/

for most stuff.

Quoted 2 lines

Do you happen to know if there's already a gcc bug open for the make install problem?

Linaro toolchain bug:
https://bugs.linaro.org/show_bug.cgi?id=2123

Quoted 6 lines

Patch to fix it
https://gcc.gnu.org/ml/gcc-patches/2016-03/msg00522.html

It is supposed to be included in the linaro 5.3-2016.03 snapshot. I've pinged Christophe to see if I can get any insight into when that will be available.

Looks like it's in the upstream tree:

https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=bfe972081c3c75019fa5a6e883dcbeb5e03eea18

I'm not sure how GCC does bug fix releases. Is this going to be in 5.4 or 5.3.1? (Is there such a thing as 5.3.1 planned?) I've CCed Jeff in case he's got a moment to peek at this.

Quoted 9 lines

It is kind of nice to see that when it fails, it prints a helpful message, though:

scripts/Makefile.gcc-plugins:22: *** error, your gcc installation does not
support plugins, perhaps the necessary headers are missing?. Stop.

I think it is OK to include this, even with the patches still bubbling through gcc releases. It prints a helpful message when it doesn't work, and is only going to be selected if specifically requested.

Yeah, absolutely. It works on the other architectures, and will soon work on arm64 too.

-Kees

Signature · 2 lines
Kees Cook
Chrome OS & Brillo Security
#13 lore raw
Quoted 7 lines · Kees Cook

Looks like it's in the upstream tree:

https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=bfe972081c3c75019fa5a6e883dcbeb5e03eea18

I'm not sure how GCC does bug fix releases. Is this going to be in 5.4 or 5.3.1? (Is there such a thing as 5.3.1 planned?) I've CCed Jeff in case he's got a moment to peek at this.

gcc-5 will be maintained until gcc-7 (due in a year) so this commit will end up in the next minor release (5.4) eventually.

#14 lore raw
In reply to Kees Cook
Quoted 2 lines · On Tue, 12 Apr 2016 11:27:52 -0700 Kees Cook <[email protected]> wrote:

Emese, were you thinking of doing the initify plugin next after this infrastructure lands?

I already started to work on the entropy plugin but after that I can work on initify.

Signature · 1 line
Emese
#15 lore raw
Quoted 7 lines · Emese Revfy
Quoted 2 lines · On Tue, 12 Apr 2016 11:27:52 -0700 Kees Cook <[email protected]> wrote:

Emese, were you thinking of doing the initify plugin next after this infrastructure lands?

I already started to work on the entropy plugin but after that I can work on initify.

Ah yes, thanks! I'd forgotten you'd mentioned the entropy plugin previously. Great!

-Kees

Signature · 2 lines
Kees Cook
Chrome OS & Brillo Security