summaryrefslogtreecommitdiff
path: root/3.2.54
diff options
context:
space:
mode:
Diffstat (limited to '3.2.54')
-rw-r--r--3.2.54/0000_README2
-rw-r--r--3.2.54/4420_grsecurity-3.0-3.2.54-201402091132.patch (renamed from 3.2.54/4420_grsecurity-3.0-3.2.54-201402090000.patch)68
2 files changed, 34 insertions, 36 deletions
diff --git a/3.2.54/0000_README b/3.2.54/0000_README
index 2e1f77c..36ebbf6 100644
--- a/3.2.54/0000_README
+++ b/3.2.54/0000_README
@@ -134,7 +134,7 @@ Patch: 1053_linux-3.2.54.patch
From: http://www.kernel.org
Desc: Linux 3.2.54
-Patch: 4420_grsecurity-3.0-3.2.54-201402090000.patch
+Patch: 4420_grsecurity-3.0-3.2.54-201402091132.patch
From: http://www.grsecurity.net
Desc: hardened-sources base patch from upstream grsecurity
diff --git a/3.2.54/4420_grsecurity-3.0-3.2.54-201402090000.patch b/3.2.54/4420_grsecurity-3.0-3.2.54-201402091132.patch
index f378eea..c8d6e90 100644
--- a/3.2.54/4420_grsecurity-3.0-3.2.54-201402090000.patch
+++ b/3.2.54/4420_grsecurity-3.0-3.2.54-201402091132.patch
@@ -1,5 +1,5 @@
diff --git a/Documentation/dontdiff b/Documentation/dontdiff
-index dfa6fc6..58798e8 100644
+index dfa6fc6..ccbfbf3 100644
--- a/Documentation/dontdiff
+++ b/Documentation/dontdiff
@@ -2,9 +2,11 @@
@@ -153,7 +153,7 @@ index dfa6fc6..58798e8 100644
r300_reg_safe.h
r420_reg_safe.h
r600_reg_safe.h
-+randomize_layout_hash.data
++randomize_layout_hash.h
+randomize_layout_seed.h
recordmcount
+regdb.c
@@ -273,7 +273,7 @@ index 88fd7f5..b318a78 100644
==============================================================
diff --git a/Makefile b/Makefile
-index 848be26..a460525 100644
+index 848be26..296b92f 100644
--- a/Makefile
+++ b/Makefile
@@ -245,8 +245,9 @@ CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
@@ -315,7 +315,7 @@ index 848be26..a460525 100644
$(Q)$(MAKE) $(build)=scripts/basic
$(Q)rm -f .tmp_quiet_recordmcount
-@@ -564,6 +571,74 @@ else
+@@ -564,6 +571,72 @@ else
KBUILD_CFLAGS += -O2
endif
@@ -343,8 +343,6 @@ index 848be26..a460525 100644
+endif
+ifdef CONFIG_GRKERNSEC_RANDSTRUCT
+RANDSTRUCT_PLUGIN_CFLAGS := -fplugin=$(objtree)/tools/gcc/randomize_layout_plugin.so -DRANDSTRUCT_PLUGIN
-+RANDSTRUCT_HASHED_SEED := $(shell cat "$(objtree)/tools/gcc/randomize_layout_hash.data")
-+RANDSTRUCT_PLUGIN_CFLAGS += -DRANDSTRUCT_HASHED_SEED="\"$(RANDSTRUCT_HASHED_SEED)\""
+ifdef CONFIG_GRKERNSEC_RANDSTRUCT_PERFORMANCE
+RANDSTRUCT_PLUGIN_CFLAGS += -fplugin-arg-randomize_layout_plugin-performance-mode
+endif
@@ -390,7 +388,7 @@ index 848be26..a460525 100644
include $(srctree)/arch/$(SRCARCH)/Makefile
ifneq ($(CONFIG_FRAME_WARN),0)
-@@ -594,7 +669,7 @@ endif
+@@ -594,7 +667,7 @@ endif
ifdef CONFIG_DEBUG_INFO
KBUILD_CFLAGS += -g
@@ -399,7 +397,7 @@ index 848be26..a460525 100644
endif
ifdef CONFIG_DEBUG_INFO_REDUCED
-@@ -708,7 +783,7 @@ export mod_strip_cmd
+@@ -708,7 +781,7 @@ export mod_strip_cmd
ifeq ($(KBUILD_EXTMOD),)
@@ -408,7 +406,7 @@ index 848be26..a460525 100644
vmlinux-dirs := $(patsubst %/,%,$(filter %/, $(init-y) $(init-m) \
$(core-y) $(core-m) $(drivers-y) $(drivers-m) \
-@@ -932,6 +1007,8 @@ vmlinux.o: $(modpost-init) $(vmlinux-main) FORCE
+@@ -932,6 +1005,8 @@ vmlinux.o: $(modpost-init) $(vmlinux-main) FORCE
# The actual objects are generated when descending,
# make sure no implicit rule kicks in
@@ -417,7 +415,7 @@ index 848be26..a460525 100644
$(sort $(vmlinux-init) $(vmlinux-main)) $(vmlinux-lds): $(vmlinux-dirs) ;
# Handle descending into subdirectories listed in $(vmlinux-dirs)
-@@ -941,7 +1018,7 @@ $(sort $(vmlinux-init) $(vmlinux-main)) $(vmlinux-lds): $(vmlinux-dirs) ;
+@@ -941,7 +1016,7 @@ $(sort $(vmlinux-init) $(vmlinux-main)) $(vmlinux-lds): $(vmlinux-dirs) ;
# Error messages still appears in the original language
PHONY += $(vmlinux-dirs)
@@ -426,7 +424,7 @@ index 848be26..a460525 100644
$(Q)$(MAKE) $(build)=$@
# Store (new) KERNELRELASE string in include/config/kernel.release
-@@ -981,10 +1058,13 @@ prepare1: prepare2 include/linux/version.h include/generated/utsrelease.h \
+@@ -981,10 +1056,13 @@ prepare1: prepare2 include/linux/version.h include/generated/utsrelease.h \
archprepare: archscripts prepare1 scripts_basic
@@ -440,7 +438,7 @@ index 848be26..a460525 100644
prepare: prepare0
# Generate some files
-@@ -1089,6 +1169,8 @@ all: modules
+@@ -1089,6 +1167,8 @@ all: modules
# using awk while concatenating to the final file.
PHONY += modules
@@ -449,7 +447,7 @@ index 848be26..a460525 100644
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.';
-@@ -1104,7 +1186,7 @@ modules.builtin: $(vmlinux-dirs:%=%/modules.builtin)
+@@ -1104,7 +1184,7 @@ modules.builtin: $(vmlinux-dirs:%=%/modules.builtin)
# Target to prepare building external modules
PHONY += modules_prepare
@@ -458,7 +456,7 @@ index 848be26..a460525 100644
# Target to install modules
PHONY += modules_install
-@@ -1163,8 +1245,9 @@ CLEAN_FILES += vmlinux System.map \
+@@ -1163,8 +1243,9 @@ CLEAN_FILES += vmlinux System.map \
MRPROPER_DIRS += include/config usr/include include/generated \
arch/*/include/generated
MRPROPER_FILES += .config .config.old .version .old_version \
@@ -466,11 +464,11 @@ index 848be26..a460525 100644
- Module.symvers tags TAGS cscope* GPATH GTAGS GRTAGS GSYMS
+ include/linux/version.h tools/gcc/size_overflow_hash.h\
+ Module.symvers tags TAGS cscope* GPATH GTAGS GRTAGS GSYMS \
-+ tools/gcc/randomize_layout_seed.h tools/gcc/randomize_layout_hash.data
++ tools/gcc/randomize_layout_seed.h
# clean - Delete most, but leave enough to build external modules
#
-@@ -1201,6 +1284,7 @@ distclean: mrproper
+@@ -1201,6 +1282,7 @@ distclean: mrproper
\( -name '*.orig' -o -name '*.rej' -o -name '*~' \
-o -name '*.bak' -o -name '#*#' -o -name '.*.orig' \
-o -name '.*.rej' \
@@ -478,7 +476,7 @@ index 848be26..a460525 100644
-o -name '*%' -o -name '.*.cmd' -o -name 'core' \) \
-type f -print | xargs rm -f
-@@ -1361,6 +1445,8 @@ PHONY += $(module-dirs) modules
+@@ -1361,6 +1443,8 @@ PHONY += $(module-dirs) modules
$(module-dirs): crmodverdir $(objtree)/Module.symvers
$(Q)$(MAKE) $(build)=$(patsubst _module_%,%,$@)
@@ -487,7 +485,7 @@ index 848be26..a460525 100644
modules: $(module-dirs)
@$(kecho) ' Building modules, stage 2.';
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost
-@@ -1487,17 +1573,21 @@ else
+@@ -1487,17 +1571,21 @@ else
target-dir = $(if $(KBUILD_EXTMOD),$(dir $<),$(dir $@))
endif
@@ -513,7 +511,7 @@ index 848be26..a460525 100644
$(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
%.symtypes: %.c prepare scripts FORCE
$(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
-@@ -1507,11 +1597,15 @@ endif
+@@ -1507,11 +1595,15 @@ endif
$(cmd_crmodverdir)
$(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \
$(build)=$(build-dir)
@@ -80703,10 +80701,10 @@ index c714ed7..fb6d16c 100644
#ifdef CONFIG_UTS_NS
diff --git a/include/linux/vermagic.h b/include/linux/vermagic.h
-index 6f8fbcf..e2a0e61 100644
+index 6f8fbcf..4efc177 100644
--- a/include/linux/vermagic.h
+++ b/include/linux/vermagic.h
-@@ -25,9 +25,41 @@
+@@ -25,9 +25,42 @@
#define MODULE_ARCH_VERMAGIC ""
#endif
@@ -80729,6 +80727,7 @@ index 6f8fbcf..e2a0e61 100644
+#endif
+
+#ifdef RANDSTRUCT_PLUGIN
++#include <generated/randomize_layout_hash.h>
+#define MODULE_RANDSTRUCT_PLUGIN "RANDSTRUCT_PLUGIN_" RANDSTRUCT_HASHED_SEED
+#else
+#define MODULE_RANDSTRUCT_PLUGIN
@@ -107041,19 +107040,18 @@ index 0a7ca6c..f4b948c 100644
};
diff --git a/tools/gcc/.gitignore b/tools/gcc/.gitignore
new file mode 100644
-index 0000000..54052c3
+index 0000000..4c2c45c
--- /dev/null
+++ b/tools/gcc/.gitignore
-@@ -0,0 +1,3 @@
-+size_overflow_hash.h
+@@ -0,0 +1,2 @@
+randomize_layout_seed.h
-+randomize_layout_hash.data
++size_overflow_hash.h
diff --git a/tools/gcc/Makefile b/tools/gcc/Makefile
new file mode 100644
-index 0000000..51a2ba2
+index 0000000..0d1d9d3
--- /dev/null
+++ b/tools/gcc/Makefile
-@@ -0,0 +1,55 @@
+@@ -0,0 +1,54 @@
+#CC := gcc
+#PLUGIN_SOURCE_FILES := pax_plugin.c
+#PLUGIN_OBJECT_FILES := $(patsubst %.c,%.o,$(PLUGIN_SOURCE_FILES))
@@ -107093,8 +107091,7 @@ index 0000000..51a2ba2
+randomize_layout_plugin-objs := randomize_layout_plugin.o
+
+$(obj)/size_overflow_plugin.o: $(objtree)/$(obj)/size_overflow_hash.h
-+$(obj)/randomize_layout_plugin.o: $(objtree)/$(obj)/randomize_layout_seed.h \
-+ $(objtree)/$(obj)/randomize_layout_hash.data
++$(obj)/randomize_layout_plugin.o: $(objtree)/$(obj)/randomize_layout_seed.h
+
+quiet_cmd_build_size_overflow_hash = GENHASH $@
+ cmd_build_size_overflow_hash = \
@@ -107104,11 +107101,11 @@ index 0000000..51a2ba2
+
+quiet_cmd_create_randomize_layout_seed = GENSEED $@
+ cmd_create_randomize_layout_seed = \
-+ $(CONFIG_SHELL) $(srctree)/$(src)/gen-random-seed.sh $@ $(objtree)/$(obj)/randomize_layout_hash.data
-+$(objtree)/$(obj)/randomize_layout_seed.h $(objtree)/$(obj)/randomize_layout_hash.data: FORCE
++ $(CONFIG_SHELL) $(srctree)/$(src)/gen-random-seed.sh $@ $(objtree)/include/generated/randomize_layout_hash.h
++$(objtree)/$(obj)/randomize_layout_seed.h: FORCE
+ $(call if_changed,create_randomize_layout_seed)
+
-+targets += size_overflow_hash.h randomize_layout_seed.h randomize_layout_hash.data
++targets += size_overflow_hash.h randomize_layout_seed.h randomize_layout_hash.h
diff --git a/tools/gcc/checker_plugin.c b/tools/gcc/checker_plugin.c
new file mode 100644
index 0000000..5452feea
@@ -108274,16 +108271,17 @@ index 0000000..312d3b6
+#endif
diff --git a/tools/gcc/gen-random-seed.sh b/tools/gcc/gen-random-seed.sh
new file mode 100644
-index 0000000..8030e6e
+index 0000000..7514850
--- /dev/null
+++ b/tools/gcc/gen-random-seed.sh
-@@ -0,0 +1,7 @@
+@@ -0,0 +1,8 @@
+#!/bin/sh
+
+if [ ! -f "$1" ]; then
+ SEED=`od -A n -t x8 -N 32 /dev/urandom | tr -d ' \n'`
+ echo "const char *randstruct_seed = \"$SEED\";" > "$1"
-+ echo -n "$SEED" | sha256sum | cut -d" " -f1 | tr -d "\n" > "$2"
++ HASH=`echo -n "$SEED" | sha256sum | cut -d" " -f1 | tr -d ' \n'`
++ echo "#define RANDSTRUCT_HASHED_SEED \"$HASH\"" > "$2"
+fi
diff --git a/tools/gcc/generate_size_overflow_hash.sh b/tools/gcc/generate_size_overflow_hash.sh
new file mode 100644